我用Zend Framework配置了PHPUnit。當我運行命令PHPunit Zend的可重複性問題
phpunit --configuration phpunit.xml
我收到我有以下assert
功能
$this->assertModule($urlParams['module']);
$this->assertController($urlParams['controller']);
$this->assertAction($urlParams['action']);
$this->assertResponseCode(200);
像
Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be compatible with that of PHPUnit_Framework_Constraint::evaluate()
失敗消息我搜索了這個問題,並發現了許多相關的解決方案,如規定here 。我檢查了我的PHPUnit版本,它是3.7.9
,Zend Framework 1只能與PHPUnit 3.5.x
正常工作。
然後我試圖降級PHPUnit
,如here所述。 un-installation
進程成功運行。但是,當我去安裝降級版本,並運行命令
pear install phpunit/PHP_CodeCoverage-1.0.2
它會產生一個錯誤
phing/phing requires package "phpunit/PHP_CodeCoverage" (version >= 1.1.0). phpunit/PHP_CodeCoverage cannot be installed, Conflicts with installed packages.
一些身體告訴我如何處理這種情況?如何使已安裝的PHPUnit版本與Zend Framework 1.X
兼容或如何正確降級我的PHPUnit?
最好的問候。
這意味着我將創建一個文件夾「vendors/bin」,並在該文件夾中安裝phpunit 3.5.x? –
[作曲家](http://getcomposer.org/doc/00-intro.md)會爲你做 – Roberto
以及如何安裝該視圖作曲家?意味着我將在上面的目錄中創建一個'compsor.json'文件,並將它們放在那裏的代碼? –