Fix: Use WP_Mock::userFunction in AdminTest
- Replaces deprecated expectFunction with userFunction. - Fixes PHPUnit failure in CI. Fix: Address PHPCS warning for unused param - Prefixes unused with underscore in Admin class.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user