I have configured PHPUnit with Zend Framework. When I run the command
phpunit --configuration phpunit.xml
I receive the failure message like
Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be compatible with that of PHPUnit_Framework_Constraint::evaluate()
I have following assert
functions
$this->assertModule($urlParams['module']);
$this->assertController($urlParams['controller']);
$this->assertAction($urlParams['action']);
$this->assertResponseCode(200);
I searched out the problem and found many related solutions like stated here. I checked my PHPUnit version it is 3.7.9
and Zend Framework 1 only properly function with PHPUnit 3.5.x
.
Then I tried to downgrade the PHPUnit
as stated here. The un-installation
process runs successfully. But when I go to install the downgraded version and run the command
pear install phpunit/PHP_CodeCoverage-1.0.2
It generates an error
phing/phing requires package "phpunit/PHP_CodeCoverage" (version >= 1.1.0). phpunit/PHP_CodeCoverage cannot be installed, Conflicts with installed packages.
Some body tell me how to handle this situation? How to make installed PHPUnit version compatible with Zend Framework 1.X
or how to properly downgrade my PHPUnit??
Best Regards.