Skip to content

Commit 2edde5b

Browse files
authored
Merge pull request #3096 from stof/phpunit_composer
Install phpunit as a dev dependency directly
2 parents 1a3ca94 + 13b604c commit 2edde5b

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,5 @@ jobs:
5050
SYMFONY_REQUIRE: ${{ matrix.symfony-versions }}
5151
run: composer update
5252

53-
- name: Install PHPUnit
54-
run: ./vendor/bin/simple-phpunit install
55-
5653
- name: Run PHPUnit tests
57-
run: |
58-
./vendor/bin/simple-phpunit
54+
run: ./vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"require-dev": {
5252
"doctrine/doctrine-bundle": "^1.3 || ^2",
5353
"friendsofphp/php-cs-fixer": "^3.0.2, !=3.5.0",
54+
"phpunit/phpunit": "^9.6",
5455
"symfony/console": "^6.4 || ^7.0",
5556
"symfony/mailer": "^6.4 || ^7.0",
5657
"symfony/mime": "^6.4 || ^7.0",

phpunit.xml.dist

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<phpunit bootstrap="./tests/bootstrap.php" colors="true">
3+
<phpunit bootstrap="./tests/bootstrap.php" colors="true"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd">
46

57
<testsuites>
68
<testsuite name="FOSUserBundle test suite">
79
<directory suffix="Test.php">./tests</directory>
810
</testsuite>
911
</testsuites>
1012

11-
<filter>
12-
<whitelist>
13+
<coverage>
14+
<include>
1315
<directory>src/</directory>
14-
<exclude>
15-
<directory>src/Resources</directory>
16-
</exclude>
17-
</whitelist>
18-
</filter>
16+
</include>
17+
<exclude>
18+
<directory>src/Resources</directory>
19+
</exclude>
20+
</coverage>
1921

2022
<php>
2123
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[total]=0" />
2224
</php>
25+
26+
<listeners>
27+
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
28+
</listeners>
2329
</phpunit>

0 commit comments

Comments
 (0)