Skip to content

Commit

Permalink
Merge pull request #610 from mzk/dev-os-phpunit-10
Browse files Browse the repository at this point in the history
Add support for phpunit 10
  • Loading branch information
alexislefebvre authored Apr 11, 2023
2 parents 745a1c6 + 8eabc5b commit 782586a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"require": {
"php": "^7.2 || ^8.0",
"phpunit/phpunit": "^7.5.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^7.5.0 || ^8.0 || ^9.0 || ^10.0",
"symfony/browser-kit": "^4.4 || ^5.1 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.1 || ^6.0"
},
Expand Down
17 changes: 7 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.de/manual/3.7/en/appendixes.configuration.html -->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
bootstrap="tests/App/bootstrap.php"
colors="true"
beStrictAboutOutputDuringTests="true"
cacheDirectory=".phpunit.cache"
>

<php>
<server name="KERNEL_CLASS" value="Liip\Acme\Tests\App\AppKernel" />
<server name="KERNEL_CLASS" value="Liip\Acme\Tests\App\AppKernel"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
</php>

<testsuites>
<testsuite name="Project Test Suite">
<directory>tests/Command</directory>
<directory>tests/DependencyInjection</directory>
<directory>tests/Test</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<coverage>
<include>
<directory>src</directory>
</whitelist>
</filter>
</include>
</coverage>
</phpunit>
5 changes: 4 additions & 1 deletion src/Utils/HttpAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ public static function assertValidationErrors(array $expected, ContainerInterfac
}

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

self::assertThat(
Expand Down

0 comments on commit 782586a

Please sign in to comment.