Repository navigation
Expand file tree
/
Copy pathphpunit.xml
More file actions
171 lines (148 loc) · 7.04 KB
/
Copy pathphpunit.xml
File metadata and controls
171 lines (148 loc) · 7.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?xml version="1.0" encoding="UTF-8"?>
<!--
phpunit.xml — Exponential 6.0.13 / eZ Publish Legacy PHPUnit 10 configuration.
Added in 6.0.13-alpha2 to fix complete test suite failure caused by missing
bootstrap when upgrading from PHPUnit 3.7 to PHPUnit 10.0.
See doc/bc/6.0/phpunitvXXXX.md for full explanation of what broke and why.
Usage:
php vendor/bin/phpunit # run all suites
php vendor/bin/phpunit - -testsuite security # security tests only
php vendor/bin/phpunit - -testsuite kernel-classes # kernel class tests only
php vendor/bin/phpunit - -list-tests # list all test methods
php vendor/bin/phpunit - -list-test-files # list all test files
php tests/runtests.php - -dsn=mysql://u:p@h/db - -db-per-test
-->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/13.0/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
failOnEmptyTestSuite="false"
cacheDirectory=".phpunit.cache"
failOnPhpunitWarning="false"
>
<testsuites>
<testsuite name="security">
<directory suffix="Test.php">tests/tests/kernel/classes/security</directory>
</testsuite>
<testsuite name="kernel-classes">
<directory suffix="Test.php">tests/tests/kernel/classes</directory>
<!-- the template operators of kernel/common, called directly; no database -->
<directory suffix="Test.php">tests/tests/kernel/common</directory>
<exclude>tests/tests/kernel/classes/security</exclude>
</testsuite>
<testsuite name="kernel-content">
<directory suffix="Test.php">tests/tests/kernel/content</directory>
</testsuite>
<testsuite name="kernel-datatypes">
<directory suffix="Test.php">tests/tests/kernel/datatypes</directory>
</testsuite>
<!-- kernel/private (REST, console commands, kernel helpers); the older *_test.php files there are not run -->
<testsuite name="kernel-private">
<directory suffix="Test.php">tests/tests/kernel/private</directory>
</testsuite>
<testsuite name="lib">
<directory suffix="Test.php">tests/tests/lib</directory>
<exclude>tests/tests/lib/ezdb/mongodb</exclude>
</testsuite>
<!--
MongoDB adapter unit tests — no live DB required.
Run: php vendor/bin/phpunit - -testsuite mongodb
-->
<testsuite name="mongodb">
<file>tests/tests/lib/ezdb/mongodb/expMongoDBAdapterTest.php</file>
<file>tests/tests/lib/ezdb/mongodb/expMongoDBDeclaredDefaultTest.php</file>
</testsuite>
<!--
MongoDB + MySQL live integration tests — require running servers.
Run: php vendor/bin/phpunit - -testsuite mongodb-live
-->
<testsuite name="mongodb-live">
<file>tests/tests/lib/ezdb/mongodb/expMongoDBIntegrationTest.php</file>
</testsuite>
<!--
cjw_newsletter: live-database tests (admin siteaccess, throwaway nltest-*@example.invalid data, mail written
by the file transport into var/tmp, never a real send, never a test database).
Run: php vendor/bin/phpunit - -testsuite cjw_newsletter
-->
<testsuite name="cjw_newsletter">
<directory suffix="Test.php">tests/tests/extension/cjw_newsletter</directory>
</testsuite>
<!--
Admin layouts (admin4l): resolver, rules, separation, cache keys, block definitions. Live database and
settings of the admin siteaccess, nothing written but the resolver's own cache generation.
Run: php vendor/bin/phpunit - -testsuite explayouts_admin
-->
<testsuite name="explayouts_admin">
<directory suffix="Test.php">tests/tests/extension/explayouts_admin</directory>
</testsuite>
<!--
ezjscore: the ezjscore/call server, with stand-in server functions. No kernel, database or siteaccess.
Run: php vendor/bin/phpunit - -testsuite ezjscore
-->
<testsuite name="ezjscore">
<directory suffix="Test.php">tests/tests/extension/ezjscore</directory>
</testsuite>
<!--
expservices: the service layer called like the ezjscore router does (content, users, commerce, community,
media, misc, core). Live database of the admin siteaccess, throwaway rows the tests remove again, never a
test database. Without an installed site (CI) every class is skipped by ezpLiveInstallation::requireOrSkip().
Run: php vendor/bin/phpunit - -testsuite expservices
-->
<testsuite name="expservices">
<directory suffix="Test.php">tests/tests/extension/expservices</directory>
</testsuite>
<!--
ezoe: the online editor's engine registry, configuration, views, upload rules and URL fetcher. Live
installation like expservices; skipped without one.
Run: php vendor/bin/phpunit - -testsuite ezoe
-->
<testsuite name="ezoe">
<directory suffix="Test.php">tests/tests/extension/ezoe</directory>
</testsuite>
<!--
quality: the sniffs of the code style check (bin/phpcs/). Needs the development tools (make devtools).
Run: php vendor/bin/phpunit - -testsuite quality
-->
<testsuite name="quality">
<directory suffix="Test.php">tests/tests/bin</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<!--
Tests tagged @group database require a live database connection.
Run them separately:
php tests/runtests.php - -db-per-test - -dsn=mysql://u:p@host/db
-->
<group>database</group>
<group>mail-live</group>
<!--
Tests tagged @group mongodb-live require running MongoDB + MySQL.
Run them separately:
php vendor/bin/phpunit - -testsuite mongodb-live
-->
<group>mongodb-live</group>
<group>network-live</group>
</exclude>
</groups>
<source>
<include>
<directory suffix=".php">lib</directory>
<directory suffix=".php">kernel</directory>
</include>
</source>
<php>
<env name="EZP_TEST_ENVIRONMENT" value="1"/>
<!-- A runaway test stops with PHP's "Allowed memory size exhausted" naming the test run,
instead of the runner killing the whole job (exit code 137, no message). The suite peaks
at about 70 MB. -->
<ini name="memory_limit" value="1G"/>
<!-- PHP_INI_SCAN_DIR is set at runtime by tests/bootstrap.php so PHPUnit's
isolated-process children can find tests/xdebug.ini without hardcoding
the repository path. -->
</php>
</phpunit>