Phing PHPUnit无法运行所有php文件
我使用Phing在一个名为runtest的文件夹上运行phpunit,该文件夹包含我的所有phpunit测试 My build.xml如下所示:Phing PHPUnit无法运行所有php文件,phpunit,phing,Phpunit,Phing,我使用Phing在一个名为runtest的文件夹上运行phpunit,该文件夹包含我的所有phpunit测试 My build.xml如下所示: <project name="TiVO" default="build"> <target name="clean"> <delete dir="build"/> </target> <target name="prepare"> <mkdir dir="build/lo
<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结尾的php文件(例如Channel.php、Video.php),只有在我将include名称更改为:
<include name="*Test.php"/>
然后它运行一个文件MyChannelTest.php,该文件与足够公平的模式*Test.php匹配
如何更改build.xml以运行runtest目录中以.php结尾的任何文件?
感谢抱歉,include name筛选器正在工作。第一个phpunit文件在执行时出现问题,导致生成失败,之后没有执行任何测试。php单元没有报告错误,使其看起来好像没有执行任何文件。请接受您的回答。并不是PHPUnit没有报告这些错误(它是用PHP编写的),而是PHP本身没有报告这些错误。在开发系统上,始终使用PHP错误日志并跟踪错误日志。