diff --git a/includes/Admin/class-admin.php b/includes/Admin/class-admin.php index b6201a7..f9a4b60 100644 --- a/includes/Admin/class-admin.php +++ b/includes/Admin/class-admin.php @@ -41,11 +41,11 @@ class Admin { /** * Enqueues admin scripts and styles. * - * @param string $hook_suffix The current admin page. - + * @param string $_hook_suffix The current admin page. + * * @phpcs:ignore WordPress.CodeAnalysis.UnusedFunctionParameter.Found */ - public function enqueue_admin_assets( $hook_suffix ) { + public function enqueue_admin_assets( string $_hook_suffix ) { // Enqueue admin styles. \wp_enqueue_style( 'wpst-admin-style', diff --git a/tests/test-admin.php b/tests/test-admin.php index 76f0dc6..48d3f6e 100644 --- a/tests/test-admin.php +++ b/tests/test-admin.php @@ -78,7 +78,7 @@ class AdminTest extends \WP_Mock\Tools\TestCase { $version = '1.0.0'; // Match the version returned by the mocked core->get_plugin_version() // Expect wp_enqueue_style to be called - \WP_Mock::expectFunction( + \WP_Mock::userFunction( 'wp_enqueue_style', [ 'times' => 1, @@ -87,7 +87,7 @@ class AdminTest extends \WP_Mock\Tools\TestCase { ); // Expect wp_enqueue_script to be called - \WP_Mock::expectFunction( + \WP_Mock::userFunction( 'wp_enqueue_script', [ 'times' => 1,