Skip to content

Commit d72eadc

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

File tree

4 files changed

+79
-7
lines changed

4 files changed

+79
-7
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'

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"dragonmantank/cron-expression": "^3.1",
136136
"egulias/email-validator": "^2.1.10|^3.1|^4",
137137
"guzzlehttp/promises": "^1.4|^2.0",
138-
"jolicode/jolinotif": "^2.7.2|^3.0",
138+
"jolicode/jolinotif": "^2.7.2",
139139
"league/html-to-markdown": "^5.0",
140140
"league/uri": "^6.5|^7.0",
141141
"masterminds/html5": "^2.7.2",

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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
require __DIR__.'/vendor/autoload.php';
4+
5+
use Symfony\Component\ErrorHandler\DebugClassLoader;
6+
7+
DebugClassLoader::enable();

0 commit comments

Comments
 (0)