File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
plugins/wpgraphql-logging Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ protected function render_view_page(): void {
299299 *
300300 * @return \WPGraphQL\Logging\Logger\Api\LogServiceInterface The log service instance.
301301 */
302- protected function get_log_service (): LogServiceInterface {
302+ public function get_log_service (): LogServiceInterface {
303303 return LogStoreService::get_log_service ();
304304 }
305305}
Original file line number Diff line number Diff line change 88use WPGraphQL \Logging \Admin \ViewLogsPage ;
99use Codeception \TestCase \WPTestCase ;
1010use Brain \Monkey ;
11+ use WPGraphQL \Logging \Logger \Api \LogServiceInterface ;
1112
1213/**
1314 * Test for the ViewLogsPage
@@ -213,4 +214,11 @@ public function test_get_redirect_url_constructs_correct_url(): void {
213214 $ url
214215 );
215216 }
217+
218+ public function test_get_log_service_returns_log_service_instance (): void {
219+ $ this ->set_as_admin ();
220+ $ instance = ViewLogsPage::init ();
221+ $ log_service = $ instance ->get_log_service ();
222+ $ this ->assertInstanceOf (LogServiceInterface::class, $ log_service );
223+ }
216224}
You can’t perform that action at this time.
0 commit comments