After updating phpunit to version 3.6.3, assertRedirectTo() fails

会有一股神秘感。 提交于 2020-01-14 11:53:53

问题


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 of PHPUnit_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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!