-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run the unit tests for the lowest and latest versions of wp/php #63
Run the unit tests for the lowest and latest versions of wp/php #63
Conversation
…instead of using core block
… blocks instead of using core blocks
…use manual block definitions
…lls and tracking them automatically
…ock unregistration
@ingeniumed The tests have been fixed, would love a review! The main issue here is that some tests were using core blocks directly, and as their attributes changed between WordPress updates it caused direct attribute comparisons to fail. A lot of tests were immune to this problem by registering their own block definitions for tests, like attribute tests: vip-block-data-api/tests/parser/sources/test-source-html.php Lines 16 to 22 in 32cda50
However, REST API and GraphQL tests were using core blocks directly: vip-block-data-api/tests/rest/test-rest-api.php Lines 39 to 51 in fc73fc5
... vip-block-data-api/tests/rest/test-rest-api.php Lines 74 to 81 in fc73fc5
The problem is that when a In the changes, I've added a couple of This should fix all test breaks related to core block attribute changes, and make future WordPress testing for this plugin less brittle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvements to the tests! Just a minor item to tweak before this can be 🚢
* Version: 1.2.3 | ||
* Requires at least: 5.9.0 | ||
* Version: 1.2.4 | ||
* Requires at least: 6.0 | ||
* Tested up to: 6.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should update this to 6.6 btw
Description
This will update the PHP unit tests workflow to run for the lowest WP/PHP version we support and the latest combo as well. That way at all times we are ensuring our code is working as expected. It also updates some of the actions that are used, to take advantage of the caching/etc improvements.