0
我正在使用Phing在名为runtest的文件夹上运行phpunit,其中包含我所有的phpunit测试。Phing PHPUnit运行所有php文件
我的build.xml低于:
<project name="TiVO" default="build">
<target name="clean">
<delete dir="build"/>
</target>
<target name="prepare">
<mkdir dir="build/logs"/>
</target>
<target name="phpunit">
<phpunit bootstrap="runtest/initalize.php" printsummary="true" haltonfailure="true">
<formatter todir="build/logs" type="xml"/>
<batchtest>
<fileset dir="runtest">
<include name="*.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
<target name="build" depends="clean,prepare,phpunit"/>
</project>
的问题是它不运行任何PHP文件(例如Channel.php,Video.php),所有最终以.php且仅当我改变工作在包括名称:
<include name="*Test.php"/>
然后运行这是不够公平的格局* test.php的相匹配的一个文件MyChannelTest.php。
如何更改我的build.xml以运行runtest目录中以.php结尾的任何文件? 谢谢
请接受您的回答。并不是PHPUnit不报告这些错误(它是用* PHP编写的),但PHP本身并没有报告这些错误。在开发系统上,始终使用PHP错误日志记录并跟踪错误日志。 – hakre 2012-08-08 12:32:13