我有一个现有的phpunit.xml (phpunit的配置文件),它如下所示:
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="./tests/bootstrap.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
strict="true"
verbose="true"
colors="true">
<testsuites>
<testsuite name="My Tests">
<directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>正如干的所说,我不想简单地将phpunit.xml的内容复制并粘贴到我的build.xml中来运行具有相同配置的phpunit。
我在build.xml for Phing中的目标如下:
<target name="unit-test">
<phpunit printsummary="true" />
</target>即使是这个phpunit也应该自动找到phpunit.xml (当我手动启动它时,就像向我的终端输入"phpunit“并按enter键一样)并使用它,如果使用phing,输出如下所示:
[phpunit] Total tests run: 0, Failures: 0, Errors: 0, Incomplete: 0, Skipped: 0, Time elapsed: 0.00122 s那么有没有办法,如何达到描述的行为呢?
https://stackoverflow.com/questions/11824932
复制相似问题