Skip to content

Commit c89477a

Browse files
committed
run integration tests using PHPUnit 11
1 parent 4ece571 commit c89477a

File tree

3 files changed

+87
-6
lines changed

3 files changed

+87
-6
lines changed

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
extensions: "json,couchbase-3.2.2,memcached,mongodb-1.12.0,redis,rdkafka,xsl,ldap,relay"
191191
ini-values: date.timezone=UTC,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
192192
php-version: "${{ matrix.php }}"
193-
tools: pecl
193+
tools: pecl,phpunit:11.3
194194

195195
- name: Display versions
196196
run: |
@@ -214,10 +214,6 @@ jobs:
214214
composer update --no-progress --ansi
215215
echo "::endgroup::"
216216
217-
echo "::group::install phpunit"
218-
./phpunit install
219-
echo "::endgroup::"
220-
221217
- name: Check for changes in translation files
222218
id: changed-translation-files
223219
run: |
@@ -231,7 +227,7 @@ jobs:
231227
git diff --exit-code src/ || (echo '::error::Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1)
232228
233229
- name: Run tests
234-
run: ./phpunit --group integration -v
230+
run: phpunit --group integration -c phpunit-integration.xml
235231
env:
236232
INTEGRATION_FTP_URL: 'ftp://test:test@localhost'
237233
REDIS_HOST: 'localhost:16379'

phpunit-integration.xml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
4+
backupGlobals="false"
5+
colors="true"
6+
bootstrap="tests-bootstrap.php"
7+
failOnRisky="true"
8+
failOnWarning="true"
9+
cacheDirectory=".phpunit.cache"
10+
>
11+
<php>
12+
<ini name="error_reporting" value="-1" />
13+
<ini name="intl.default_locale" value="en" />
14+
<ini name="intl.error_level" value="0" />
15+
<ini name="memory_limit" value="-1" />
16+
<env name="DUMP_LIGHT_ARRAY" value="" />
17+
<env name="DUMP_STRING_LENGTH" value="" />
18+
<env name="LDAP_HOST" value="localhost" />
19+
<env name="LDAP_PORT" value="3389" />
20+
<env name="REDIS_HOST" value="localhost" />
21+
<env name="REDIS_SOCKET" value="/var/run/redis/redis-server.sock" />
22+
<env name="MESSENGER_REDIS_DSN" value="redis://localhost/messages" />
23+
<env name="MEMCACHED_HOST" value="localhost" />
24+
<env name="MONGODB_HOST" value="localhost" />
25+
<env name="ZOOKEEPER_HOST" value="localhost" />
26+
<env name="COUCHBASE_HOST" value="localhost" />
27+
<env name="COUCHBASE_USER" value="Administrator" />
28+
<env name="COUCHBASE_PASS" value="111111@" />
29+
</php>
30+
31+
<testsuites>
32+
<testsuite name="Symfony Test Suite">
33+
<directory>./src/Symfony/Bridge/*/Tests/</directory>
34+
<directory>./src/Symfony/Component/*/Tests/</directory>
35+
<directory>./src/Symfony/Component/*/*/Tests/</directory>
36+
<directory>./src/Symfony/Component/*/*/*/Tests/</directory>
37+
<directory>./src/Symfony/Contract/*/Tests/</directory>
38+
<directory>./src/Symfony/Bundle/*/Tests/</directory>
39+
</testsuite>
40+
</testsuites>
41+
42+
<groups>
43+
<exclude>
44+
<group>benchmark</group>
45+
<group>intl-data</group>
46+
</exclude>
47+
</groups>
48+
49+
<source ignoreSuppressionOfDeprecations="true">
50+
<include>
51+
<directory>./src/Symfony/</directory>
52+
</include>
53+
<exclude>
54+
<directory>./src/Symfony/Bridge/*/Tests</directory>
55+
<directory>./src/Symfony/Component/*/Tests</directory>
56+
<directory>./src/Symfony/Component/*/*/Tests</directory>
57+
<directory>./src/Symfony/Contract/*/Tests</directory>
58+
<directory>./src/Symfony/Bundle/*/Tests</directory>
59+
<directory>./src/Symfony/Bundle/*/Resources</directory>
60+
<directory>./src/Symfony/Component/*/Resources</directory>
61+
<directory>./src/Symfony/Component/*/*/Resources</directory>
62+
<directory>./src/Symfony/Bridge/*/vendor</directory>
63+
<directory>./src/Symfony/Bundle/*/vendor</directory>
64+
<directory>./src/Symfony/Component/*/vendor</directory>
65+
<directory>./src/Symfony/Component/*/*/vendor</directory>
66+
<directory>./src/Symfony/Contract/*/vendor</directory>
67+
</exclude>
68+
</source>
69+
</phpunit>

tests-bootstrap.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
require __DIR__.'/vendor/autoload.php';
13+
14+
use Symfony\Component\ErrorHandler\DebugClassLoader;
15+
16+
DebugClassLoader::enable();

0 commit comments

Comments
 (0)