Skip to content

Commit

Permalink
Composer/Tests: update test dependencies
Browse files Browse the repository at this point in the history
This updates the minimum version of the WP Test Utils dependency.

This also allows us to remove the work-around which was in place for Mockery not handling dynamic properties on mocked objects.
This was fixed in Mockery 1.6.0, which will be used when running the tests against PHP 8.2+.

Note: PHPUnit Polyfills 1.1.0 includes a new polyfill for the `assertObject[Not]HasProperty()` methods.
The assertions which these new assertions replace are not used in this test suite, so no test changes are needed.
  • Loading branch information
jrfnl committed Oct 4, 2023
1 parent 6c9f430 commit e0686fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"require-dev": {
"yoast/yoastcs": "^2.3.1",
"yoast/wp-test-utils": "^1.1.1",
"yoast/wp-test-utils": "^1.2.0",
"roave/security-advisories": "dev-master"
},
"autoload": {
Expand Down
13 changes: 0 additions & 13 deletions tests/unit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,3 @@

require_once __DIR__ . '/../../vendor/yoast/wp-test-utils/src/BrainMonkey/bootstrap.php';
require_once __DIR__ . '/../../vendor/autoload.php';

// Create the necessary test doubles for WP native classes on which properties are being set.
Yoast\WPTestUtils\BrainMonkey\makeDoublesForUnavailableClasses(
[
'WP_Post',
'WP_Post_Type',
'WP_Role',
'WP_Screen',
'WP_Taxonomy',
'WP_Term',
'WP_User',
]
);

0 comments on commit e0686fe

Please sign in to comment.