Skip to content

Commit ed44485

Browse files
jrfnlgrogy
authored andcommitted
PHPUnit: improve configuration
Move the CLI arguments which can be placed in the configuration file to the configuration file and removed them from the Ant build configuration.
1 parent 9afe892 commit ed44485

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

build.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@
6363
<delete file="${basedir}/build/logs/phpunit.xml" quiet="true" />
6464

6565
<exec executable="${phpunit}" failonerror="true">
66-
<arg line='--configuration ${basedir}/phpunit.xml.dist' />
67-
<arg line='-d memory_limit=256M' />
68-
<arg line='--log-junit "${basedir}/build/logs/phpunit.xml"' />
66+
<arg line='--no-coverage' />
6967
<arg line='${colors-arg.color}' />
7068
</exec>
7169
</target>
@@ -77,11 +75,6 @@
7775
<mkdir dir="${basedir}/build/coverage" />
7876

7977
<exec executable="${phpunit}" failonerror="true">
80-
<arg line='--configuration ${basedir}/phpunit.xml.dist' />
81-
<arg line='-d memory_limit=256M' />
82-
<arg line='--log-junit "${basedir}/build/logs/phpunit.xml"' />
83-
<arg line='--coverage-clover "${basedir}/build/logs/clover.xml"' />
84-
<arg line='--coverage-html "${basedir}/build/coverage/"' />
8578
<arg line='${colors-arg.color}' />
8679
</exec>
8780
</target>

phpunit.xml.dist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,14 @@
1414
<directory suffix=".php">src</directory>
1515
</whitelist>
1616
</filter>
17+
18+
<logging>
19+
<log type="junit" target="build/logs/phpunit.xml"/>
20+
<log type="coverage-clover" target="build/logs/clover.xml"/>
21+
<log type="coverage-html" target="build/coverage/"/>
22+
</logging>
23+
24+
<php>
25+
<ini name="memory_limit" value="256M"/>
26+
</php>
1727
</phpunit>

0 commit comments

Comments
 (0)