PHP_CodeCoverage_Filter :: getInstance()运行phpunit时出错 [英] PHP_CodeCoverage_Filter::getInstance() Error running phpunit
本文介绍了PHP_CodeCoverage_Filter :: getInstance()运行phpunit时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在ubuntu 11.10中安装了phpunit,其php版本为5.2.14.
I have installed phpunit in my ubuntu 11.10 having php version 5.2.14.
但是当我运行测试模块时,它会抛出错误,
But when I run my test module it is throwing error,
PHP Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/PHPUnit/Autoload.php on line 64
我遵循了这个堆栈问题中提到的步骤,但是仍然没有运气.
I followed the steps mention in this stack question but still no luck.
调用未定义方法PHP_CodeCoverage_Filter :: getInstance()
推荐答案
以下步骤解决了我的问题.
Following steps solved my problem.
sudo apt-get remove phpunit
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony.com
sudo pear channel-discover components.ez.no
sudo pear update-channels
sudo pear upgrade-all
sudo pear install --alldeps phpunit/PHPUnit
sudo pear install --force --alldeps phpunit/PHPUnit
这篇关于PHP_CodeCoverage_Filter :: getInstance()运行phpunit时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文