Declaration of Zend_Test_PHPUnit_Constraint_DomQuery::evaluate() should be compatible with that of PHPUnit_Framework_Constraint::evaluate()(Zend_Test_PHPUnit_Constraint_DomQuery::evaluate() 的声明应该与 PHPUnit_Framework_Constraint::evaluate() 的声明兼容)
问题描述
我正在尝试使用 PHPUnit 3.6.4 对我的 Zend Framework 应用程序进行单元测试.当我在命令提示符中尝试此命令时,出现以下错误.
I am trying to unit test my Zend Framework application using PHPUnit 3.6.4. I get the following error when i try this command in my command prompt.
C:xampphtdocs estsample ests>phpunit --configuration phpunit.xml
PHPUnit 3.6.4 by Sebastian Bergmann.
Configuration read from C:xampphtdocs estsample estsphpunit.xml
←[31;1mE←[0m←[31;1mE←[0m..
Time: 0 seconds, Memory: 10.00Mb
There were 2 errors:
1) IndexControllerTest::testIndexWithMessageAction
Declaration of Zend_Test_PHPUnit_Constraint_DomQuery::evaluate() should be compatible
with that of PHPUnit_Framework_Constraint::evaluate()
C:xampphtdocshivelibraryendTestPHPUnitConstraintDomQuery.php:40
C:xampphtdocshivelibraryendTestPHPUnitControllerTestCase.php:512
C:xampphtdocs estsample estsapplicationcontrollersIndexControllerTest.php
:14
C:xamppphpPEARPHPUnitFrameworkTestCase.php:925
C:xamppphpPEARPHPUnitFrameworkTestCase.php:787
C:xamppphpPEARPHPUnitFrameworkTestResult.php:649
C:xamppphpPEARPHPUnitFrameworkTestCase.php:734
C:xamppphpPEARPHPUnitFrameworkTestSuite.php:772
C:xamppphpPEARPHPUnitFrameworkTestSuite.php:745
C:xamppphpPEARPHPUnitFrameworkTestSuite.php:705
C:xamppphpPEARPHPUnitTextUITestRunner.php:325
C:xamppphpPEARPHPUnitTextUICommand.php:187
C:xamppphpPEARPHPUnitTextUICommand.php:125
C:xamppphpphpunit:44
2) IndexControllerTest::testIndexNoMessageAction
Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be
compatible with that of PHPUnit_Framework_Constraint::evaluate()
C:xampphtdocshivelibraryendTestPHPUnitConstraintResponseHeader.php:400
C:xampphtdocshivelibraryendTestPHPUnitControllerTestCase.php:769
C:xampphtdocshivelibraryendTestPHPUnitControllerTestCase.php:769
C:xampphtdocs estsample estsapplicationcontrollersIndexControllerTest.php
:22
C:xamppphpPEARPHPUnitFrameworkTestCase.php:925
C:xamppphpPEARPHPUnitFrameworkTestCase.php:787
C:xamppphpPEARPHPUnitFrameworkTestResult.php:649
C:xamppphpPEARPHPUnitFrameworkTestCase.php:734
C:xamppphpPEARPHPUnitFrameworkTestSuite.php:772
C:xamppphpPEARPHPUnitFrameworkTestSuite.php:745
C:xamppphpPEARPHPUnitFrameworkTestSuite.php:705
C:xamppphpPEARPHPUnitTextUITestRunner.php:325
C:xamppphpPEARPHPUnitTextUICommand.php:187
C:xamppphpPEARPHPUnitTextUICommand.php:125
C:xamppphpphpunit:44
←[37;41m←[2KFAILURES!
←[0m←[37;41m←[2KTests: 4, Assertions: 10, Errors: 2.
←[0m←[2K
Generating code coverage report, this may take a moment.
为什么我会收到这个错误?我做错了什么?请帮帮我
Why am i getting this error? What is that I've done wrong? Please help me
推荐答案
Zend Framework 1 应用程序当前,可能在相当长一段时间内,只能使用 PHPUnit 3.5.x 正常运行.
Zend Framework 1 applications currently, and possibly for quite some time, only function properly using PHPUnit 3.5.x.
请参见将phpunit 3.6降级到3.5.15 关于如何降级到 3.5.
Please see downgrade phpunit 3.6 to 3.5.15 on how to downgrade to 3.5.
Zend Framework 2 将再次支持当前版本的 PHPUnit.
Zend Framework 2 will support the current version of PHPUnit again.
这篇关于Zend_Test_PHPUnit_Constraint_DomQuery::evaluate() 的声明应该与 PHPUnit_Framework_Constraint::evaluate() 的声明兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Zend_Test_PHPUnit_Constraint_DomQuery::evaluate() 的声明应该与 PHPUnit_Framework_Constraint::evaluate() 的声明兼容
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
