zend-framework - 将 phpunit 更新到 3.6.3 版本后,assertRedirectTo() 失败

标签 zend-framework phpunit

在更新 phpunit 之前一切正常,函数 assertRedirectTo()正常工作,但更新后显示此错误:

Declaration of Zend_Test_PHPUnit_Constraint_Redirect::evaluate() should be compatible with that of PHPUnit_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/

相关文章:

php - 如何存储 zend、phing 和 phpunit 的共享配置?

php - 从默认模块中的自定义操作帮助器访问 Zend url 操作帮助器

php - Zend Framework - 如何从 Action 助手中调用 Controller 的 redirect()

php - 在 x86_64 GNU/Linux 上升级 PEAR

php - 如何修复 PHPUnit Logger::flush() 声明错误?

php - 如何在 Windows 笔记本电脑上本地设置 PHPUnit?

PHPUnit 和 die 函数

zend-framework - Zend 搜索 Lucene 和重音字符

php - Zend Framework : Using Models and Views, 最佳实践

php - 如何检索引导文件中的请求对象? Zend 框架/PHP