我已经安装了 PHPUnit 和 Composer。我在composer.json中有以下行
"require-dev": {
"phpunit/phpunit": "~4.3"
},
当我运行测试用例时,出现以下错误。我已经搜索过这个错误,但在网上找不到可能的相关解决方案:
Vishal@VISHAL-PC c:\xampp\htdocs\V4\test\Core
phpunit ResponseTest
PHPUnit 4.3.5 by Sebastian Bergmann.
Fatal error: Class PHPUnit_Util_DeprecatedFeature_Logger contains 1 abstract met
hod and must therefore be declared abstract or implement the remaining methods (
PHPUnit_Framework_TestListener::addRiskyTest) in C:\xampp\php\pear\PHPUnit\Util\
DeprecatedFeature\Logger.php on line 201
我不知道这是从哪里来的。任何建议、链接或评论将不胜感激。
最佳答案
PHPUnit_Util_DeprecatedFeature_Logger
类已在 PHPUnit 4.2 中删除。如果您安装的 PHPUnit 4.3 尝试使用该类,这意味着您的安装不知何故搞砸了。
关于PHP 单元测试错误 - PHPUnit_Util_DeprecatedFeature_Logger,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26932814/