问题
Before updating phpunit everything was ok, function assertRedirectTo()
worked as it should, but after updating it shows this error:
Declaration of
Zend_Test_PHPUnit_Constraint_Redirect::evaluate()
should be compatible with that ofPHPUnit_Framework_Constraint::evaluate()
Can anybody explain what exactly happened?
回答1:
Yes, I ran into this problem too two days ago. But on the unfortunetly Zend Framework 1.x is not going to support PHPunit 3.6 or higher :-(
So the best thing is that you go back to 3.5 which is the latest version Zend Framework supports.
Check this:
http://zendframework.com/issues/browse/ZF-11871
Here you can read they will proberly make ZF2 supporting 3.6: http://zend-framework-community.634137.n4.nabble.com/Running-the-zend-unit-tests-with-the-phpunit-3-6-PHP-CodeCoverage-Filter-getInstance-problem-td4023996.html
来源:https://stackoverflow.com/questions/8092118/after-updating-phpunit-to-version-3-6-3-assertredirectto-fails