在更新 phpunit 之前一切正常,函数 assertRedirectTo()
正常工作,但更新后显示此错误:
Declaration of
Zend_Test_PHPUnit_Constraint_Redirect::evaluate()
should be compatible with that ofPHPUnit_Framework_Constraint::evaluate()
谁能解释一下到底发生了什么?
最佳答案
是的,前两天我也遇到了这个问题。但不幸的是,Zend Framework 1.x 不支持 PHPunit 3.6 或更高版本:-(
所以最好的事情是你回到 3.5,这是 Zend Framework 支持的最新版本。
检查这个:
http://zendframework.com/issues/browse/ZF-11871
在这里你可以读到他们会让 ZF2 支持 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
关于zend-framework - 将 phpunit 更新到 3.6.3 版本后,assertRedirectTo() 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8092118/