Skip to content

Commit 9742206

Browse files
authored
Add PHPUnit 10 support (#18)
1 parent c0d8c3a commit 9742206

File tree

3 files changed

+7
-27
lines changed

3 files changed

+7
-27
lines changed

composer.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@
1616
"php": "^5.5 || ^7.0 || ^8.0",
1717
"ext-dom": "*",
1818
"ext-libxml": "*",
19-
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0",
19+
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0 || ^10.0",
2020
"phpunitgoodpractices/polyfill": "^1.4"
2121
},
22-
"require-dev": {
23-
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
24-
"symfony/phpunit-bridge": "^3.2.2 || ^4.0"
25-
},
2622
"autoload": {
2723
"psr-4": {
2824
"PhpCsFixer\\PhpunitConstraintXmlMatchesXsd\\": "src/"

phpunit.xml.dist

+4-22
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,26 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
66
backupGlobals="false"
7-
backupStaticAttributes="false"
87
beStrictAboutChangesToGlobalState="true"
98
beStrictAboutOutputDuringTests="true"
109
beStrictAboutTestsThatDoNotTestAnything="true"
1110
beStrictAboutTodoAnnotatedTests="true"
1211
bootstrap="./vendor/autoload.php"
1312
colors="true"
1413
columns="max"
15-
convertErrorsToExceptions="true"
16-
convertNoticesToExceptions="true"
17-
convertWarningsToExceptions="true"
1814
enforceTimeLimit="true"
1915
processIsolation="false"
2016
stopOnFailure="false"
21-
verbose="true"
2217
>
2318
<testsuites>
2419
<testsuite name="all">
2520
<directory>./tests</directory>
2621
</testsuite>
2722
</testsuites>
2823

29-
<filter>
30-
<whitelist>
24+
<coverage>
25+
<include>
3126
<directory>./src</directory>
32-
</whitelist>
33-
</filter>
34-
35-
<listeners>
36-
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener">
37-
<arguments>
38-
<array>
39-
<element key="slowThreshold">
40-
<integer>100</integer>
41-
</element>
42-
</array>
43-
</arguments>
44-
</listener>
45-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
46-
</listeners>
27+
</include>
28+
</coverage>
4729
</phpunit>

tests/Constraint/XmlMatchesXsdTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ private function expectExceptionMessageRegex($pattern)
150150
{
151151
if (method_exists($this, 'expectExceptionMessageRegExp')) {
152152
$this->expectExceptionMessageRegExp($pattern);
153+
} elseif (method_exists($this, 'expectExceptionMessageMatches')) {
154+
$this->expectExceptionMessageMatches($pattern);
153155
} elseif (method_exists($this, 'expectDeprecationMessageMatches')) {
154156
$this->expectDeprecationMessageMatches($pattern);
155157
} else {

0 commit comments

Comments
 (0)