在我的测试目录上运行 phpunit 时遇到问题。默认的类继承是这样的:ControllerTest> ProjectTestCase> Zend_Test_PHPUnit_ControllerTestCase。
两者ProjectTestCare都Zend_Test_PHPUnit_ControllerTestCase位于测试目录之外。
这是看起来的phpunit.xml样子:
<phpunit bootstrap="./bootstrap.php" colors="true" stopOnFailure="true">
<testsuite name="Application Test Suite">
<directory suffix="ControllerTest.php">./application/controllers</directory>
</testsuite>
<filter>
<whitelist>
<directory>../../library/Zend</directory>
<directory>../../library/Doctrine</directory>
</whitelist>
</filter>
问题是它发现ProjectTestCase并中止,因为它不包含错误。
它与 testsuite 目录不匹配,也不匹配后缀模式。
任何遇到此问题或对如何解决此问题有新想法的人?