Skip to content

Commit 189e109

Browse files
authored
Merge pull request #8773 from kenjis/fix-phpunit-cache-dir
chore: move PHPUnit cache to build/
2 parents 8263e08 + 754309e commit 189e109

File tree

6 files changed

+138
-105
lines changed

6 files changed

+138
-105
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,5 @@ nb-configuration.xml
125125

126126
/results/
127127
/phpunit*.xml
128-
/.phpunit.*.cache
129-
/.phpunit.cache
130128

131129
/.php-cs-fixer.php

admin/framework/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,3 @@ nb-configuration.xml
124124

125125
/results/
126126
/phpunit*.xml
127-
/.phpunit.*.cache
128-

admin/framework/phpunit.xml.dist

Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,63 @@
11
<?xml version="1.0" encoding="UTF-8"?>
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
31-
<env name="database.tests.hostname" value="localhost"/>
32-
<env name="database.tests.database" value="tests"/>
33-
<env name="database.tests.username" value="tests_user"/>
34-
<env name="database.tests.password" value=""/>
35-
<env name="database.tests.DBDriver" value="MySQLi"/>
36-
<env name="database.tests.DBPrefix" value="tests_"/>
37-
-->
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>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
5+
bootstrap="system/Test/bootstrap.php"
6+
backupGlobals="false"
7+
beStrictAboutOutputDuringTests="true"
8+
colors="true"
9+
columns="max"
10+
failOnRisky="true"
11+
failOnWarning="true"
12+
cacheDirectory="build/.phpunit.cache">
13+
<coverage
14+
includeUncoveredFiles="true"
15+
pathCoverage="false"
16+
ignoreDeprecatedCodeUnits="true"
17+
disableCodeCoverageIgnore="true">
18+
<report>
19+
<clover outputFile="build/logs/clover.xml"/>
20+
<html outputDirectory="build/logs/html"/>
21+
<php outputFile="build/logs/coverage.serialized"/>
22+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
23+
</report>
24+
</coverage>
25+
<testsuites>
26+
<testsuite name="App">
27+
<directory>./tests</directory>
28+
</testsuite>
29+
</testsuites>
30+
<logging>
31+
<testdoxHtml outputFile="build/logs/testdox.html"/>
32+
<testdoxText outputFile="build/logs/testdox.txt"/>
33+
<junit outputFile="build/logs/logfile.xml"/>
34+
</logging>
35+
<source>
36+
<include>
37+
<directory suffix=".php">./app</directory>
38+
</include>
39+
<exclude>
40+
<directory suffix=".php">./app/Views</directory>
41+
<file>./app/Config/Routes.php</file>
42+
</exclude>
43+
</source>
44+
<php>
45+
<server name="app.baseURL" value="http://example.com/"/>
46+
<server name="CODEIGNITER_SCREAM_DEPRECATIONS" value="0"/>
47+
<!-- Directory containing phpunit.xml -->
48+
<const name="HOMEPATH" value="./"/>
49+
<!-- Directory containing the Paths config file -->
50+
<const name="CONFIGPATH" value="./app/Config/"/>
51+
<!-- Directory containing the front controller (index.php) -->
52+
<const name="PUBLICPATH" value="./public/"/>
53+
<!-- Database configuration -->
54+
<!-- Uncomment to provide your own database for testing
55+
<env name="database.tests.hostname" value="localhost"/>
56+
<env name="database.tests.database" value="tests"/>
57+
<env name="database.tests.username" value="tests_user"/>
58+
<env name="database.tests.password" value=""/>
59+
<env name="database.tests.DBDriver" value="MySQLi"/>
60+
<env name="database.tests.DBPrefix" value="tests_"/>
61+
-->
62+
</php>
4863
</phpunit>

admin/starter/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,3 @@ nb-configuration.xml
124124

125125
/results/
126126
/phpunit*.xml
127-
/.phpunit.*.cache
128-

admin/starter/phpunit.xml.dist

Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,63 @@
11
<?xml version="1.0" encoding="UTF-8"?>
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
31-
<env name="database.tests.hostname" value="localhost"/>
32-
<env name="database.tests.database" value="tests"/>
33-
<env name="database.tests.username" value="tests_user"/>
34-
<env name="database.tests.password" value=""/>
35-
<env name="database.tests.DBDriver" value="MySQLi"/>
36-
<env name="database.tests.DBPrefix" value="tests_"/>
37-
-->
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>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
5+
bootstrap="system/Test/bootstrap.php"
6+
backupGlobals="false"
7+
beStrictAboutOutputDuringTests="true"
8+
colors="true"
9+
columns="max"
10+
failOnRisky="true"
11+
failOnWarning="true"
12+
cacheDirectory="build/.phpunit.cache">
13+
<coverage
14+
includeUncoveredFiles="true"
15+
pathCoverage="false"
16+
ignoreDeprecatedCodeUnits="true"
17+
disableCodeCoverageIgnore="true">
18+
<report>
19+
<clover outputFile="build/logs/clover.xml"/>
20+
<html outputDirectory="build/logs/html"/>
21+
<php outputFile="build/logs/coverage.serialized"/>
22+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
23+
</report>
24+
</coverage>
25+
<testsuites>
26+
<testsuite name="App">
27+
<directory>./tests</directory>
28+
</testsuite>
29+
</testsuites>
30+
<logging>
31+
<testdoxHtml outputFile="build/logs/testdox.html"/>
32+
<testdoxText outputFile="build/logs/testdox.txt"/>
33+
<junit outputFile="build/logs/logfile.xml"/>
34+
</logging>
35+
<source>
36+
<include>
37+
<directory suffix=".php">./app</directory>
38+
</include>
39+
<exclude>
40+
<directory suffix=".php">./app/Views</directory>
41+
<file>./app/Config/Routes.php</file>
42+
</exclude>
43+
</source>
44+
<php>
45+
<server name="app.baseURL" value="http://example.com/"/>
46+
<server name="CODEIGNITER_SCREAM_DEPRECATIONS" value="0"/>
47+
<!-- Directory containing phpunit.xml -->
48+
<const name="HOMEPATH" value="./"/>
49+
<!-- Directory containing the Paths config file -->
50+
<const name="CONFIGPATH" value="./app/Config/"/>
51+
<!-- Directory containing the front controller (index.php) -->
52+
<const name="PUBLICPATH" value="./public/"/>
53+
<!-- Database configuration -->
54+
<!-- Uncomment to provide your own database for testing
55+
<env name="database.tests.hostname" value="localhost"/>
56+
<env name="database.tests.database" value="tests"/>
57+
<env name="database.tests.username" value="tests_user"/>
58+
<env name="database.tests.password" value=""/>
59+
<env name="database.tests.DBDriver" value="MySQLi"/>
60+
<env name="database.tests.DBPrefix" value="tests_"/>
61+
-->
62+
</php>
4863
</phpunit>

phpunit.xml.dist

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
<?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/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">
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
5+
bootstrap="system/Test/bootstrap.php"
6+
backupGlobals="false"
7+
beStrictAboutOutputDuringTests="true"
8+
colors="true"
9+
columns="max"
10+
failOnRisky="true"
11+
failOnWarning="true"
12+
cacheDirectory="build/.phpunit.cache">
13+
<coverage
14+
includeUncoveredFiles="true"
15+
pathCoverage="false"
16+
ignoreDeprecatedCodeUnits="true"
17+
disableCodeCoverageIgnore="true">
918
<report>
1019
<clover outputFile="build/logs/clover.xml"/>
1120
<html outputDirectory="build/coverage/html" highLowerBound="80"/>

0 commit comments

Comments
 (0)