【问题标题】:ant: running phpcb after phpunit failsant:在 phpunit 失败后运行 phpcb
【发布时间】:2013-09-17 16:01:12
【问题描述】:

在推荐的 php ant 脚本中,最后给出了 phpcb,因为它使用了由 phpcs、phpmd、phpunit、phpcpd 等生成的所有日志文件。问题是我的 phpunit 这些天没有通过,而 phpcb 没有全部就无法运行以前的进程返回 true,并且没有 phpcb 构建失败。那么如何让 phpcb 在所有工具之后运行而不考虑退出代码呢?

【问题讨论】:

    标签: php ant build phpunit


    【解决方案1】:

    在 build.xml 中你可以忽略 phpunit 失败并继续执行 Ant 脚本。

    <target name="phpunit" description="Run unit tests with PHPUnit">
        <exec executable="phpunit" failonerror="false">
        [...]
    </target>
    

    【讨论】:

      【解决方案2】:

      修复 PHPUnit 测试。

      如果不可能,请跳过那些失败的测试,并致电$this-&gt;markTestSkipped('Here is the reason why this test isn't fixed...')

      有关详细信息,请参阅documentation

      如果你在详细模式下运行 PHPUnit,你会得到一个持续的提醒来修复测试。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-12-08
        • 1970-01-01
        • 1970-01-01
        • 2013-04-15
        • 2015-10-31
        • 2013-05-05
        • 2011-12-05
        • 2011-10-30
        相关资源
        最近更新 更多