Skip to content

Commit d696bbc

Browse files
committed
Add correct PHPUnit config
1 parent 152b196 commit d696bbc

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

phpunit.xml.dist

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="tests/_support/bootstrap.php"
3-
backupGlobals="false"
4-
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
stopOnError="false"
9-
stopOnFailure="false"
10-
stopOnIncomplete="false"
11-
stopOnSkipped="false">
2+
<phpunit bootstrap="vendor/codeigniter4/codeigniter4/system/Test/bootstrap.php"
3+
backupGlobals="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
stopOnError="false"
9+
stopOnFailure="false"
10+
stopOnIncomplete="false"
11+
stopOnSkipped="false">
1212
<testsuites>
13-
<testsuite name="all">
13+
<testsuite name="app">
1414
<directory>./tests</directory>
1515
</testsuite>
1616
</testsuites>
@@ -24,7 +24,7 @@
2424
</exclude>
2525
</whitelist>
2626
</filter>
27-
27+
2828
<logging>
2929
<log type="coverage-html" target="build/logs/html"/>
3030
<log type="coverage-clover" target="build/logs/clover.xml"/>
@@ -36,8 +36,21 @@
3636
</logging>
3737

3838
<php>
39-
<env name="app.baseURL" value="http://example.com"/>
40-
<env name="CI_ENVIRONMENT" value="testing"/>
39+
<server name="app.baseURL" value="http://example.com"/>
40+
41+
<!-- Directory containing phpunit.xml -->
42+
<const name="HOMEPATH" value="./"/>
43+
44+
<!-- Directory containing the Paths config file -->
45+
<const name="CONFIGPATH" value="./vendor/codeigniter4/codeigniter4/app/Config/"/>
46+
47+
<!-- Directory containing the front controller (index.php) -->
48+
<const name="PUBLICPATH" value="./vendor/codeigniter4/codeigniter4/public/"/>
49+
50+
<!-- https://getcomposer.org/xdebug -->
51+
<env name="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
52+
53+
<!-- Database configuration -->
4154
<!-- <env name="database.tests.hostname" value="localhost"/> -->
4255
<!-- <env name="database.tests.database" value="tests"/> -->
4356
<!-- <env name="database.tests.username" value="tests_user"/> -->

0 commit comments

Comments
 (0)