Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add PHPUnit 10 support #18

Merged
merged 1 commit into from
Mar 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@
"php": "^5.5 || ^7.0 || ^8.0",
"ext-dom": "*",
"ext-libxml": "*",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0 || ^10.0",
"phpunitgoodpractices/polyfill": "^1.4"
},
"require-dev": {
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
"symfony/phpunit-bridge": "^3.2.2 || ^4.0"
},
"autoload": {
"psr-4": {
"PhpCsFixer\\PhpunitConstraintXmlMatchesXsd\\": "src/"
Expand Down
26 changes: 4 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,26 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
bootstrap="./vendor/autoload.php"
colors="true"
columns="max"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
enforceTimeLimit="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
>
<testsuites>
<testsuite name="all">
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<coverage>
<include>
<directory>./src</directory>
</whitelist>
</filter>

<listeners>
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener">
<arguments>
<array>
<element key="slowThreshold">
<integer>100</integer>
</element>
</array>
</arguments>
</listener>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
</include>
</coverage>
</phpunit>
2 changes: 2 additions & 0 deletions tests/Constraint/XmlMatchesXsdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ private function expectExceptionMessageRegex($pattern)
{
if (method_exists($this, 'expectExceptionMessageRegExp')) {
$this->expectExceptionMessageRegExp($pattern);
} elseif (method_exists($this, 'expectExceptionMessageMatches')) {
$this->expectExceptionMessageMatches($pattern);
} elseif (method_exists($this, 'expectDeprecationMessageMatches')) {
$this->expectDeprecationMessageMatches($pattern);
} else {
Expand Down