Skip to content

Commit e360bed

Browse files
committed
chore: update phpunit.xml.dist for PHPUnit10
vendor/bin/phpunit --migrate-configuration -c phpunit.xml.dist
1 parent 041cd7a commit e360bed

3 files changed

Lines changed: 102 additions & 132 deletions

File tree

admin/framework/phpunit.xml.dist

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,48 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
bootstrap="system/Test/bootstrap.php"
4-
backupGlobals="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
stopOnError="false"
10-
stopOnFailure="false"
11-
stopOnIncomplete="false"
12-
stopOnSkipped="false"
13-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
14-
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
15-
<include>
16-
<directory suffix=".php">./app</directory>
17-
</include>
18-
<exclude>
19-
<directory suffix=".php">./app/Views</directory>
20-
<file>./app/Config/Routes.php</file>
21-
</exclude>
22-
<report>
23-
<clover outputFile="build/logs/clover.xml"/>
24-
<html outputDirectory="build/logs/html"/>
25-
<php outputFile="build/logs/coverage.serialized"/>
26-
<text outputFile="php://stdout" showUncoveredFiles="false"/>
27-
</report>
28-
</coverage>
29-
<testsuites>
30-
<testsuite name="App">
31-
<directory>./tests</directory>
32-
</testsuite>
33-
</testsuites>
34-
<logging>
35-
<testdoxHtml outputFile="build/logs/testdox.html"/>
36-
<testdoxText outputFile="build/logs/testdox.txt"/>
37-
<junit outputFile="build/logs/logfile.xml"/>
38-
</logging>
39-
<php>
40-
<server name="app.baseURL" value="http://example.com/"/>
41-
<!-- Directory containing phpunit.xml -->
42-
<const name="HOMEPATH" value="./"/>
43-
<!-- Directory containing the Paths config file -->
44-
<const name="CONFIGPATH" value="./app/Config/"/>
45-
<!-- Directory containing the front controller (index.php) -->
46-
<const name="PUBLICPATH" value="./public/"/>
47-
<!-- Database configuration -->
48-
<!-- Uncomment to provide your own database for testing
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="system/Test/bootstrap.php" backupGlobals="false" colors="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
3+
<coverage includeUncoveredFiles="true">
4+
<report>
5+
<clover outputFile="build/logs/clover.xml"/>
6+
<html outputDirectory="build/logs/html"/>
7+
<php outputFile="build/logs/coverage.serialized"/>
8+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
9+
</report>
10+
</coverage>
11+
<testsuites>
12+
<testsuite name="App">
13+
<directory>./tests</directory>
14+
</testsuite>
15+
</testsuites>
16+
<logging>
17+
<testdoxHtml outputFile="build/logs/testdox.html"/>
18+
<testdoxText outputFile="build/logs/testdox.txt"/>
19+
<junit outputFile="build/logs/logfile.xml"/>
20+
</logging>
21+
<php>
22+
<server name="app.baseURL" value="http://example.com/"/>
23+
<!-- Directory containing phpunit.xml -->
24+
<const name="HOMEPATH" value="./"/>
25+
<!-- Directory containing the Paths config file -->
26+
<const name="CONFIGPATH" value="./app/Config/"/>
27+
<!-- Directory containing the front controller (index.php) -->
28+
<const name="PUBLICPATH" value="./public/"/>
29+
<!-- Database configuration -->
30+
<!-- Uncomment to provide your own database for testing
4931
<env name="database.tests.hostname" value="localhost"/>
5032
<env name="database.tests.database" value="tests"/>
5133
<env name="database.tests.username" value="tests_user"/>
5234
<env name="database.tests.password" value=""/>
5335
<env name="database.tests.DBDriver" value="MySQLi"/>
5436
<env name="database.tests.DBPrefix" value="tests_"/>
5537
-->
56-
</php>
38+
</php>
39+
<source>
40+
<include>
41+
<directory suffix=".php">./app</directory>
42+
</include>
43+
<exclude>
44+
<directory suffix=".php">./app/Views</directory>
45+
<file>./app/Config/Routes.php</file>
46+
</exclude>
47+
</source>
5748
</phpunit>

admin/starter/phpunit.xml.dist

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,48 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
4-
backupGlobals="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
stopOnError="false"
10-
stopOnFailure="false"
11-
stopOnIncomplete="false"
12-
stopOnSkipped="false"
13-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
14-
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
15-
<include>
16-
<directory suffix=".php">./app</directory>
17-
</include>
18-
<exclude>
19-
<directory suffix=".php">./app/Views</directory>
20-
<file>./app/Config/Routes.php</file>
21-
</exclude>
22-
<report>
23-
<clover outputFile="build/logs/clover.xml"/>
24-
<html outputDirectory="build/logs/html"/>
25-
<php outputFile="build/logs/coverage.serialized"/>
26-
<text outputFile="php://stdout" showUncoveredFiles="false"/>
27-
</report>
28-
</coverage>
29-
<testsuites>
30-
<testsuite name="App">
31-
<directory>./tests</directory>
32-
</testsuite>
33-
</testsuites>
34-
<logging>
35-
<testdoxHtml outputFile="build/logs/testdox.html"/>
36-
<testdoxText outputFile="build/logs/testdox.txt"/>
37-
<junit outputFile="build/logs/logfile.xml"/>
38-
</logging>
39-
<php>
40-
<server name="app.baseURL" value="http://example.com/"/>
41-
<!-- Directory containing phpunit.xml -->
42-
<const name="HOMEPATH" value="./"/>
43-
<!-- Directory containing the Paths config file -->
44-
<const name="CONFIGPATH" value="./app/Config/"/>
45-
<!-- Directory containing the front controller (index.php) -->
46-
<const name="PUBLICPATH" value="./public/"/>
47-
<!-- Database configuration -->
48-
<!-- Uncomment to provide your own database for testing
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php" backupGlobals="false" colors="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
3+
<coverage includeUncoveredFiles="true">
4+
<report>
5+
<clover outputFile="build/logs/clover.xml"/>
6+
<html outputDirectory="build/logs/html"/>
7+
<php outputFile="build/logs/coverage.serialized"/>
8+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
9+
</report>
10+
</coverage>
11+
<testsuites>
12+
<testsuite name="App">
13+
<directory>./tests</directory>
14+
</testsuite>
15+
</testsuites>
16+
<logging>
17+
<testdoxHtml outputFile="build/logs/testdox.html"/>
18+
<testdoxText outputFile="build/logs/testdox.txt"/>
19+
<junit outputFile="build/logs/logfile.xml"/>
20+
</logging>
21+
<php>
22+
<server name="app.baseURL" value="http://example.com/"/>
23+
<!-- Directory containing phpunit.xml -->
24+
<const name="HOMEPATH" value="./"/>
25+
<!-- Directory containing the Paths config file -->
26+
<const name="CONFIGPATH" value="./app/Config/"/>
27+
<!-- Directory containing the front controller (index.php) -->
28+
<const name="PUBLICPATH" value="./public/"/>
29+
<!-- Database configuration -->
30+
<!-- Uncomment to provide your own database for testing
4931
<env name="database.tests.hostname" value="localhost"/>
5032
<env name="database.tests.database" value="tests"/>
5133
<env name="database.tests.username" value="tests_user"/>
5234
<env name="database.tests.password" value=""/>
5335
<env name="database.tests.DBDriver" value="MySQLi"/>
5436
<env name="database.tests.DBPrefix" value="tests_"/>
5537
-->
56-
</php>
38+
</php>
39+
<source>
40+
<include>
41+
<directory suffix=".php">./app</directory>
42+
</include>
43+
<exclude>
44+
<directory suffix=".php">./app/Views</directory>
45+
<file>./app/Config/Routes.php</file>
46+
</exclude>
47+
</source>
5748
</phpunit>

phpunit.xml.dist

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4-
bootstrap="system/Test/bootstrap.php"
5-
backupGlobals="false"
6-
beStrictAboutOutputDuringTests="true"
7-
beStrictAboutTodoAnnotatedTests="true"
8-
cacheResultFile="build/.phpunit.cache/test-results"
9-
colors="true"
10-
columns="max"
11-
failOnRisky="true"
12-
failOnWarning="true"
13-
verbose="true">
14-
15-
<coverage cacheDirectory="build/.phpunit.cache/code-coverage"
16-
processUncoveredFiles="true"
17-
ignoreDeprecatedCodeUnits="true">
18-
<include>
19-
<directory suffix=".php">system</directory>
20-
</include>
21-
22-
<exclude>
23-
<directory>system/Commands/Generators/Views</directory>
24-
<directory>system/Debug/Toolbar/Views</directory>
25-
<directory>system/Pager/Views</directory>
26-
<directory>system/ThirdParty</directory>
27-
<directory>system/Validation/Views</directory>
28-
<file>system/bootstrap.php</file>
29-
<file>system/ComposerScripts.php</file>
30-
<file>system/Config/Routes.php</file>
31-
<file>system/Test/bootstrap.php</file>
32-
<file>system/Test/ControllerTester.php</file>
33-
<file>system/Test/FeatureTestCase.php</file>
34-
</exclude>
35-
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
4+
bootstrap="system/Test/bootstrap.php" backupGlobals="false"
5+
beStrictAboutOutputDuringTests="true" colors="true" columns="max"
6+
failOnRisky="true" failOnWarning="true"
7+
cacheDirectory=".phpunit.cache">
8+
<coverage ignoreDeprecatedCodeUnits="true">
369
<report>
3710
<clover outputFile="build/logs/clover.xml"/>
3811
<html outputDirectory="build/coverage/html" highLowerBound="80"/>
3912
<text outputFile="build/coverage/text/coverage.txt"/>
4013
</report>
4114
</coverage>
42-
4315
<testsuites>
4416
<testsuite name="System">
4517
<directory>tests/system</directory>
4618
</testsuite>
4719
</testsuites>
48-
4920
<extensions>
5021
<extension class="Nexus\PHPUnit\Extension\Tachycardia">
5122
<arguments>
@@ -66,7 +37,6 @@
6637
</arguments>
6738
</extension>
6839
</extensions>
69-
7040
<php>
7141
<server name="app.baseURL" value="http://example.com/"/>
7242
<server name="CODEIGNITER_SCREAM_DEPRECATIONS" value="1"/>
@@ -77,4 +47,22 @@
7747
<!-- Directory containing the front controller (index.php) -->
7848
<const name="PUBLICPATH" value="./public/"/>
7949
</php>
50+
<source>
51+
<include>
52+
<directory suffix=".php">system</directory>
53+
</include>
54+
<exclude>
55+
<directory>system/Commands/Generators/Views</directory>
56+
<directory>system/Debug/Toolbar/Views</directory>
57+
<directory>system/Pager/Views</directory>
58+
<directory>system/ThirdParty</directory>
59+
<directory>system/Validation/Views</directory>
60+
<file>system/bootstrap.php</file>
61+
<file>system/ComposerScripts.php</file>
62+
<file>system/Config/Routes.php</file>
63+
<file>system/Test/bootstrap.php</file>
64+
<file>system/Test/ControllerTester.php</file>
65+
<file>system/Test/FeatureTestCase.php</file>
66+
</exclude>
67+
</source>
8068
</phpunit>

0 commit comments

Comments
 (0)