Skip to content

Commit

Permalink
tests: Replace deprecated PHPUnit assertObject(Not)HasAttribute (#3…
Browse files Browse the repository at this point in the history
…3268)

PHPUnit 10 at first removed this but then in 10.1 re-added it as
`assertObject(Not)HasProperty`. Now that a replacement exists,
yoast/phpunit-polyfills provides a polyfill, so let's make use of it.

Note WordPress's `WP_UnitTestCase` and WorDBless's
`WorDBless\BaseTestCase` both already include all Yoast polyfill traits,
so explicit use of the trait is only needed for things using PHPUnit's
base class.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6302853196
  • Loading branch information
anomiex authored and matticbot committed Sep 25, 2023
1 parent 6250453 commit 13ab2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^3.3.9",
"automattic/jetpack-changelogger": "^3.3.10-alpha",
"automattic/jetpack-connection": "^1.58.0-alpha",
"automattic/wordbless": "^0.4.1"
},
Expand Down

0 comments on commit 13ab2bf

Please sign in to comment.