Releases: dingo-d/wp-pest
1.7.0
2.0.0-alpha
This is an alpha release of v2 for wp-pest lib.
The library uses Pest v2 and all the dependencies that will allow us to use it.
This means the minimum required PHP version has been increased to PHP 8.1, and the lib depends on an untested branch of wp-test-utils
.
In order to install it locally you'll need to add: "minimum-stability": "dev",
to your composer.json
file
Testing is welcomed.
Add PHP 8.2 test matrix
Added
- PHP 8.2 to the test matrix to ensure nothing is failing on PHP 8.2
Update integration tests and package name
Changed
- Fix the integration test base class
-
Previously, both unit and integration tests used the same base test class. While this worked, integration tests weren't using the polyfilled
WP_UnitTestCase
case from the wp-test-utils package.This, in turn, meant that the tests weren't properly cleaned up, and that some usefull features, like WordPress test factories couldn't be used easily in the integration tests.
The caveat is that, because of how Pest works, we cannot just define the
uses
statement in thePest.php
file, because the WordPress unit test class becomes available after the bootstrap process. For more details see the issue pestphp/pest#623.
-
- Change the name of the package to
dingo-d/wp-pest
None of this is a BC break, as your tests will work. This jsut makes it work a bit better.
v 1.5.0
Added
- Add a
force
parameter to force download WordPress files - Add additional tests
- Some tests are skipped because they cannot be run in isolation, or the underlying component does type casting.
Fixed
- Fix the issue with WP core not being included in the development version
- By default, the
wordpress-develop
git repo doesn't contain all the WP Core files,
so now we have to download development files for tests and the core separately.
- By default, the
- Remove unnecessary error checks
Updated
- Stubs are updated to mimic WP 6.1.1 version
Fix slug not
Fixes
- Slug validation was poor, this release fixes it, and fixes #15
Update command for CI/CD runs
Added
- Add an option to avoid the prompt at the end of the setup command
- This caused issue in CI/CD pipelines where the setup command would just hang without confirmation.
Fix version checks
Fixed
- Fixed the #10 issue - tags not correctly fetched from the API
Changed
- Updated the method for getting tags, and verifying against the correct one
Fix argument check in bootstrap
Changed
- Fixed the
--group=integration
check in the bootstrap- Before it depended on the position of the argument, so in PhpStorm running tests
failed because the argument wasn't in the second place.
- Before it depended on the position of the argument, so in PhpStorm running tests
Update base test case
Changed
- Add Yoast's TestCase as the base test case to both unit and integration tests in
Pest.php