Skip to content

Commit 782586a

Browse files
Merge pull request #610 from mzk/dev-os-phpunit-10
Add support for phpunit 10
2 parents 745a1c6 + 8eabc5b commit 782586a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
],
1717
"require": {
1818
"php": "^7.2 || ^8.0",
19-
"phpunit/phpunit": "^7.5.0 || ^8.0 || ^9.0",
19+
"phpunit/phpunit": "^7.5.0 || ^8.0 || ^9.0 || ^10.0",
2020
"symfony/browser-kit": "^4.4 || ^5.1 || ^6.0",
2121
"symfony/framework-bundle": "^4.4 || ^5.1 || ^6.0"
2222
},

phpunit.xml.dist

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!-- https://phpunit.de/manual/3.7/en/appendixes.configuration.html -->
43
<phpunit
54
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.5/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
76
bootstrap="tests/App/bootstrap.php"
87
colors="true"
98
beStrictAboutOutputDuringTests="true"
9+
cacheDirectory=".phpunit.cache"
1010
>
11-
1211
<php>
13-
<server name="KERNEL_CLASS" value="Liip\Acme\Tests\App\AppKernel" />
12+
<server name="KERNEL_CLASS" value="Liip\Acme\Tests\App\AppKernel"/>
1413
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
1514
</php>
16-
1715
<testsuites>
1816
<testsuite name="Project Test Suite">
1917
<directory>tests/Command</directory>
2018
<directory>tests/DependencyInjection</directory>
2119
<directory>tests/Test</directory>
2220
</testsuite>
2321
</testsuites>
24-
25-
<filter>
26-
<whitelist>
22+
<coverage>
23+
<include>
2724
<directory>src</directory>
28-
</whitelist>
29-
</filter>
25+
</include>
26+
</coverage>
3027
</phpunit>

src/Utils/HttpAssertions.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ public static function assertValidationErrors(array $expected, ContainerInterfac
9898
}
9999

100100
if (!$container->has('liip_functional_test.validator')) {
101-
trigger_error(sprintf('Method %s() can not be used as the validation component of the Symfony framework is disabled.', __METHOD__), \E_USER_WARNING);
101+
self::fail(sprintf(
102+
'Method %s() can not be used as the validation component of the Symfony framework is disabled.',
103+
__METHOD__
104+
));
102105
}
103106

104107
self::assertThat(

0 commit comments

Comments
 (0)