Fix: Correct PHPUnit test assertion and install PHPCS composer installer
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
"php": ">=7.0"
|
"php": ">=7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^6.5",
|
"phpunit/phpunit": "^9.5",
|
||||||
"10up/wp_mock": "0.3.0",
|
"10up/wp_mock": "0.3.0",
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
||||||
"wp-coding-standards/wpcs": "^3.0",
|
"wp-coding-standards/wpcs": "^3.0",
|
||||||
|
|||||||
2587
composer.lock
generated
Normal file
2587
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,7 @@ class AdminTest extends \WP_Mock\Tools\TestCase {
|
|||||||
public function test_constructor() {
|
public function test_constructor() {
|
||||||
// Verify that the constructor initializes hooks
|
// Verify that the constructor initializes hooks
|
||||||
$this->assertInstanceOf(Admin::class, $this->admin);
|
$this->assertInstanceOf(Admin::class, $this->admin);
|
||||||
WP_Mock::assertActionAdded('admin_enqueue_scripts', [$this->admin, 'enqueue_admin_assets']);
|
WP_Mock::expectActionAdded('admin_enqueue_scripts', [$this->admin, 'enqueue_admin_assets']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user