mirror of
https://gh.wpcy.net/https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-04-24 23:58:18 +08:00
PHP_CodeSniffer 3.8.0 now allows for running the tests, which are based on the PHPCS native test suite, with PHPUnit 8 and 9.
This commit updates the package to take advantage of that.
Includes:
* Widening the PHPUnit version requirements.
* Adding the PHPUnit 8+ cache file to `.gitignore`.
* Updating the PHPUnit configuration to make sure that deprecations will always show, even when on a high PHPUnit 9.6 version.
* Updating the info in `CONTRIBUTING`.
* Simplifications to the `quicktest` and `test` workflows.
Also, the code coverage "high" run can now be run against PHP 8.3.
* Running PHPStan against PHP `latest` (couldn't previously be done due to the old PHPUnit version).
* Minor tweak to the PHPStan config to make sure PHP 8.x specific issues don't get flagged for this codebase.
* Removing a no longer needed `--ignore-platform*` argument.
* Updating the "setUp" method in one test to call the parent "setUp" method via the new method name.
Ref:
* PHPCSStandards/PHP_CodeSniffer 59
38 lines
1.3 KiB
XML
38 lines
1.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<phpunit
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
|
|
backupGlobals="true"
|
|
bootstrap="./Tests/bootstrap.php"
|
|
convertErrorsToExceptions="true"
|
|
convertWarningsToExceptions="true"
|
|
convertNoticesToExceptions="true"
|
|
convertDeprecationsToExceptions="true"
|
|
beStrictAboutTestsThatDoNotTestAnything="false"
|
|
colors="true"
|
|
forceCoversAnnotation="true">
|
|
|
|
<testsuites>
|
|
<testsuite name="WordPress">
|
|
<directory suffix="UnitTest.php">./WordPress/Tests/</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
|
|
<filter>
|
|
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="false">
|
|
<file>./WordPress/Sniff.php</file>
|
|
<file>./WordPress/AbstractArrayAssignmentRestrictionsSniff.php</file>
|
|
<file>./WordPress/AbstractClassRestrictionsSniff.php</file>
|
|
<file>./WordPress/AbstractFunctionParameterSniff.php</file>
|
|
<file>./WordPress/AbstractFunctionRestrictionsSniff.php</file>
|
|
<directory>./WordPress/Sniffs/</directory>
|
|
<directory>./WordPress/Helpers/</directory>
|
|
</whitelist>
|
|
</filter>
|
|
|
|
<logging>
|
|
<log type="coverage-text" target="php://stdout" showOnlySummary="true"/>
|
|
<log type="coverage-clover" target="build/logs/clover.xml"/>
|
|
</logging>
|
|
|
|
</phpunit>
|