我只是用Zend Framework做了一些示例。正如官方教程所说,我创建了一个Album模块。它运作良好。 现在我想添加Unti测试到这个模块。 我正在使用本指南:http://framework.zend.com/manual/2.1/en/tutorials/unittesting.html 但在“一个失败的测试案例”一章中,我得到了一个不同的错误。PhpUnit + Zend框架 - application.config.php:未能打开流
C:\wamp\www\zf2-tutorial\module\Album\test>phpunit PHPUnit 3.7.19 by Sebastian Bergmann.
Configuration read from C:\wamp\www\zf2-tutorial\module\Album\test\phpunit.xml
←[31;1mE←[0m
Time: 0 seconds, Memory: 8.75Mb
There was 1 error:
1) AlbumTest\Controller\AlbumControllerTest::testIndexActionCanBeAccessed include(/var/www/zf2-tutorial/config/application.config.php): failed to open str eam: No such file or directory
C:\wamp\www\zf2-tutorial\module\Album\test\AlbumTest\Controller\IndexControllerT est.php:14 C:\wamp\www\zf2-tutorial\module\Album\test\AlbumTest\Controller\IndexControllerT est.php:14
←[37;41m←[2KFAILURES! ←[0m←[37;41m←[2KTests: 1, Assertions: 0, Errors: 1. ←[0m←[2K
这里有什么问题?我正在寻找解决方案,但可以找到任何此问题。
(Sorry for my english)
哇...这就是很尴尬,becouse几个小时前,我有这个想法,但不知怎的,没有尝试... Btw thx的答案! – Adam 2013-04-26 11:03:14
不客气。顺便说一句:如果答案确实解决了您的问题,我将不胜感激,如果您将其标记为“已接受的答案”:) – 2013-04-26 11:05:39
请务必使他的最后解决方案工作。如果您部署到Linux服务器,您的C:\路径将失败 – STLMikey 2013-10-03 21:09:25