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
Tests: make test suite compatible with PHPUnit 10.x #483
Tests: make test suite compatible with PHPUnit 10.x #483
Commits on Jun 6, 2023
-
Composer: update the PHPUnit Polyfills
A PHPUnit 10 compatible version of the PHPUnit Polyfills has been released, so let's start using it. Ref: * https://github.com/Yoast/PHPUnit-Polyfills/releases/tag/2.0.0
Configuration menu - View commit details
-
Copy full SHA for df2a845 - Browse repository at this point
Copy the full SHA df2a845View commit details -
Tests/PolyfilledTestCase: make compatible with PHPUnit Polyfills 2.x
As the available traits are different between the 1.x and 2.x versions of the PHPUnit Polyfills, two different class definitions are needed. This change uses the available PHPUnit Polyfills version number to load the correct class.
Configuration menu - View commit details
-
Copy full SHA for ce14e92 - Browse repository at this point
Copy the full SHA ce14e92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80c3723 - Browse repository at this point
Copy the full SHA 80c3723View commit details
Commits on Jun 12, 2023
-
Tests: make dataproviders
static
As of PHPUnit 10, data providers are (again) expected to be `static` methods. This updates the test suite to respect that. Includes removing the use of `$this` from select data providers. Refs: * sebastianbergmann/phpunit@9caafe2 * sebastianbergmann/phpunit 5100
Configuration menu - View commit details
-
Copy full SHA for 47a7549 - Browse repository at this point
Copy the full SHA 47a7549View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f3df55 - Browse repository at this point
Copy the full SHA 8f3df55View commit details -
Tests/InterpolatedVariablesTest: make data providers
static
for com……patibility with PHPUnit 10
Configuration menu - View commit details
-
Copy full SHA for 6e8a439 - Browse repository at this point
Copy the full SHA 6e8a439View commit details -
Tests/[NoFile]Cache/SetTest: remove use of the remove PHPUnit `TestCa…
…se::getName()` method ... in favour of just using a randomly generated ID for the cache.
Configuration menu - View commit details
-
Copy full SHA for 90a6179 - Browse repository at this point
Copy the full SHA 90a6179View commit details -
Tests/HasNewLineSupportTest: work round removal of the `setOutputCall…
…back()` method PHPUnit 10.0 removed the `TestCase::setOutputCallback()` method without replacement. Refs: * sebastianbergmann/phpunit 5319
Configuration menu - View commit details
-
Copy full SHA for c1ad96c - Browse repository at this point
Copy the full SHA c1ad96cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed53f2e - Browse repository at this point
Copy the full SHA ed53f2eView commit details -
Tests: add new
ExpectWithConsecutiveArgs
helper trait... to provide a work-around for the removal of the `InvocationMocker->withConsecutive()` method, which was removed without replacement in PHPUnit 10.0. Refs: * sebastianbergmann/phpunit 4026 * sebastianbergmann/phpunit 4255 * sebastianbergmann/phpunit 4564
Configuration menu - View commit details
-
Copy full SHA for 8ecebee - Browse repository at this point
Copy the full SHA 8ecebeeView commit details -
Tests/AbstractArrayDeclarationSniffTest: implement use of the `Expect…
…WithConsecutiveArgs` helper
Configuration menu - View commit details
-
Copy full SHA for ddcecc9 - Browse repository at this point
Copy the full SHA ddcecc9View commit details -
Tests/AbstractArrayDeclarationSniffTest: work around for `MockBuilder…
…::setMethods()` removal Please note: * The `getMockBuilder()` class is also deprecated now, so replacing with another method call on the `MockBuilder` class will only work in the short/medium term and in a future iteration, this will have to be refactored again. * Also the `getMockForAbstractClass method is also deprecated and expected to be removed in PHPUnit 12. Refs: * sebastianbergmann/phpunit 3687#issuecomment-492537584 * sebastianbergmann/phpunit 3770 * sebastianbergmann/phpunit 3769 * sebastianbergmann/phpunit 4775
Configuration menu - View commit details
-
Copy full SHA for 6653cdd - Browse repository at this point
Copy the full SHA 6653cddView commit details -
PHPUnit: add separate configuration for PHPUnit 10
PHPUnit 10 makes significant changes to the configuration file. While there is a `--migrate-configuration` option available in PHPUnit, that doesn't get us a well enough converted configuration file, so instead use a separate `phpunit10.xml.dist` file for running the tests on PHPUnit 10 with an optimal configuration. Includes * Adding separate scripts to the `composer.json` file to make this more obvious for contributors. * Updating the GH Actions workflows to take the new configuration file into account when appropriate. * Selectively not using the `--repeat` option, which was [removed without replacement](sebastianbergmann/phpunit#5174) in PHPUnit 10.
Configuration menu - View commit details
-
Copy full SHA for 1914d5f - Browse repository at this point
Copy the full SHA 1914d5fView commit details