Skip to content

Commit 10a9b78

Browse files
author
farhadzand
committed
Fix PHPUnit configuration deprecation warning
- Migrate PHPUnit configuration to use latest schema - Remove deprecated XML structure - Add cacheDirectory attribute and source block - All tests now pass without deprecation warnings
1 parent 152d5bf commit 10a9b78

File tree

1 file changed

+28
-35
lines changed

1 file changed

+28
-35
lines changed

phpunit.xml

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
testdox="true">
7-
<testsuites>
8-
<testsuite name="Unit">
9-
<directory suffix="Test.php">./tests/Unit</directory>
10-
</testsuite>
11-
<testsuite name="Feature">
12-
<directory suffix="Test.php">./tests/Feature</directory>
13-
</testsuite>
14-
</testsuites>
15-
16-
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
17-
<include>
18-
<directory suffix=".php">./src</directory>
19-
</include>
20-
<exclude>
21-
<directory suffix=".php">./src/Storage</directory>
22-
<directory suffix=".php">./src/Exceptions</directory>
23-
</exclude>
24-
</coverage>
25-
26-
<php>
27-
<env name="APP_ENV" value="testing"/>
28-
<env name="PROMETHEUS_ENABLED" value="true"/>
29-
<env name="PROMETHEUS_STORAGE_DRIVER" value="memory"/>
30-
<ini name="error_reporting" value="E_ALL &amp; ~E_DEPRECATED"/>
31-
<ini name="memory_limit" value="512M"/>
32-
</php>
33-
34-
<logging>
35-
<junit outputFile="build/logs/junit.xml"/>
36-
</logging>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" testdox="true" cacheDirectory=".phpunit.cache">
3+
<testsuites>
4+
<testsuite name="Unit">
5+
<directory suffix="Test.php">./tests/Unit</directory>
6+
</testsuite>
7+
<testsuite name="Feature">
8+
<directory suffix="Test.php">./tests/Feature</directory>
9+
</testsuite>
10+
</testsuites>
11+
<php>
12+
<env name="APP_ENV" value="testing"/>
13+
<env name="PROMETHEUS_ENABLED" value="true"/>
14+
<env name="PROMETHEUS_STORAGE_DRIVER" value="memory"/>
15+
<ini name="error_reporting" value="E_ALL &amp; ~E_DEPRECATED"/>
16+
<ini name="memory_limit" value="512M"/>
17+
</php>
18+
<logging>
19+
<junit outputFile="build/logs/junit.xml"/>
20+
</logging>
21+
<source>
22+
<include>
23+
<directory suffix=".php">./src</directory>
24+
</include>
25+
<exclude>
26+
<directory suffix=".php">./src/Storage</directory>
27+
<directory suffix=".php">./src/Exceptions</directory>
28+
</exclude>
29+
</source>
3730
</phpunit>

0 commit comments

Comments
 (0)