diff --git a/tests/Manager/AssetTest.php b/tests/Manager/AssetTest.php index aa40587..53b1c9f 100644 --- a/tests/Manager/AssetTest.php +++ b/tests/Manager/AssetTest.php @@ -20,8 +20,8 @@ class AssetTest extends LapsTestCase { $manager = new Asset_Manager(); - $this->assertTrue( has_action( 'wp_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) ); - $this->assertTrue( has_action( 'admin_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) ); + $this->assertTrue( (bool) has_action( 'wp_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) ); + $this->assertTrue( (bool) has_action( 'admin_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) ); return $manager; } diff --git a/tests/Manager/LoadOrderTest.php b/tests/Manager/LoadOrderTest.php index 0b39d0a..7abb313 100644 --- a/tests/Manager/LoadOrderTest.php +++ b/tests/Manager/LoadOrderTest.php @@ -20,8 +20,8 @@ class LoadOrderTest extends LapsTestCase { $manager = new Load_Order_Manager(); - $this->assertTrue( has_action( 'pre_update_option_active_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) ); - $this->assertTrue( has_action( 'pre_update_site_option_active_sitewide_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) ); + $this->assertTrue( (bool) has_action( 'pre_update_option_active_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) ); + $this->assertTrue( (bool) has_action( 'pre_update_site_option_active_sitewide_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) ); return $manager; diff --git a/tests/Manager/ToolbarTest.php b/tests/Manager/ToolbarTest.php index 1c6c508..4b67957 100644 --- a/tests/Manager/ToolbarTest.php +++ b/tests/Manager/ToolbarTest.php @@ -23,7 +23,7 @@ class ToolbarTest extends LapsTestCase { $collector = new Lazy_Proxy_Collector( [] ); $manager = new Toolbar_Manager( $collector, new \Mustache_Engine() ); - $this->assertTrue( has_action( 'admin_bar_menu', [ $manager, 'admin_bar_menu' ] ) ); + $this->assertTrue( (bool) has_action( 'admin_bar_menu', [ $manager, 'admin_bar_menu' ] ) ); return $manager; } diff --git a/tests/Record/HookTest.php b/tests/Record/HookTest.php index 07474f9..609332d 100644 --- a/tests/Record/HookTest.php +++ b/tests/Record/HookTest.php @@ -18,9 +18,9 @@ class HookTest extends LapsTestCase { $stopwatch = new Stopwatch(); $collector = new Hook_Collector( $stopwatch, [ 'core' => new Core_Events() ] ); - $this->assertTrue( has_action( 'after_setup_theme', [ $collector, 'after_setup_theme' ] ) ); + $this->assertTrue( (bool) has_action( 'after_setup_theme', [ $collector, 'after_setup_theme' ] ) ); - $this->assertTrue( has_action( 'plugins_loaded', 'function ($input)' ) ); + $this->assertTrue( (bool) has_action( 'plugins_loaded', 'function ($input)' ) ); $collector->after_setup_theme(); $stopwatch->start( 'Toolbar' ); diff --git a/tests/Record/HttpTest.php b/tests/Record/HttpTest.php index c66aae3..f19d124 100644 --- a/tests/Record/HttpTest.php +++ b/tests/Record/HttpTest.php @@ -18,8 +18,8 @@ class HttpTest extends LapsTestCase { $url = 'https://example.com/'; $collector = new Http_Collector( $stopwatch ); - $this->assertTrue( has_action( 'pre_http_request', [ $collector, 'pre_http_request' ] ) ); - $this->assertTrue( has_action( 'http_api_debug', [ $collector, 'http_api_debug' ] ) ); + $this->assertTrue( (bool) has_action( 'pre_http_request', [ $collector, 'pre_http_request' ] ) ); + $this->assertTrue( (bool) has_action( 'http_api_debug', [ $collector, 'http_api_debug' ] ) ); $collector->pre_http_request( false, [], $url ); diff --git a/tests/Record/SqlTest.php b/tests/Record/SqlTest.php index 315991b..ef4178a 100644 --- a/tests/Record/SqlTest.php +++ b/tests/Record/SqlTest.php @@ -24,7 +24,7 @@ class SqlTest extends LapsTestCase { $collector = new Sql_Collector(); - $this->assertTrue( has_filter( 'query', [ $collector, 'query' ] ) ); + $this->assertTrue( (bool) has_filter( 'query', [ $collector, 'query' ] ) ); $query = 'SELECT * FROM wp_posts';