Skip to content

Commit

Permalink
Add PHPUnit 10 support (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos authored Mar 11, 2023
1 parent c0d8c3a commit 9742206
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
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

0 comments on commit 9742206

Please sign in to comment.