Zend framework2 在Zend Framework 2项目中包含运行phpunit和phing的路径问题

Zend framework2 在Zend Framework 2项目中包含运行phpunit和phing的路径问题,zend-framework2,phpunit,phing,Zend Framework2,Phpunit,Phing,使用Phing,我试图运行位于每个模块中的phpunit测试。但它不起作用。如果我在每个模块中调用phpunit,测试运行时不会出现问题。但如果我通过phing中的phpunit任务调用它们,我会收到以下错误: PHP致命错误:未找到类“Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase” 这是我的phpunit任务的副本: <phpunit bootstrap="${moduledir}/${modulename}/te

使用Phing,我试图运行位于每个模块中的phpunit测试。但它不起作用。如果我在每个模块中调用phpunit,测试运行时不会出现问题。但如果我通过phing中的phpunit任务调用它们,我会收到以下错误:

PHP致命错误:未找到类“Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase”

这是我的phpunit任务的副本:

<phpunit bootstrap="${moduledir}/${modulename}/test/${phpunitbootstrap}" 
         printsummary="true"
         haltonfailure="false" description="test the module" 
         haltonerror="true"
         configuration="${moduledir}/${modulename}/test/phpunit.xml.dist">
    <formatter todir="report" type="xml" outfile="test-report.xml"/>
    <batchtest>
        <fileset dir="${modulename}Test">
            <include name="**/*Test.php"/>
        </fileset>
    </batchtest>
</phpunit>

这在foreach循环内调用,以迭代多个模块。我猜phpunit任务配置设置不正确,但不确定


有人能帮我解决这个问题吗?

嗨,你找到解决这个问题的方法了吗?我从Jenkins for ZF2项目的持续集成开始,不知道如何在Jenkins构建报告中集中所有这些测试。谢谢你的回答@Hooli看起来他们建议的是ApacheAnt而不是Phing。查看他们的模板这可能会对@Hooli有所帮助,我还没有找到解决方案,但我很想尝试Erik提供的解决方案。在gituhb上,我为初学者提交了zf2 repo,其中包括phpunit的集中启动、CI的jenkins配置、doctrine2等。。。。在这里: