![升级到 11.04 后 Phpunit 停止工作](https://linux22.com/image/1075283/%E5%8D%87%E7%BA%A7%E5%88%B0%2011.04%20%E5%90%8E%20Phpunit%20%E5%81%9C%E6%AD%A2%E5%B7%A5%E4%BD%9C.png)
我刚刚升级到 11.04,现在 phpunit 不再工作了 :((它在 10.10 上运行良好)。以下是控制台中显示的内容:
david@david-P55M-UD2:/var/www/magento$ phpunit UnitTests.php
PHP Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/bin/phpunit on line 38
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
有什么建议吗?
答案1
如图所示所以,这对我有用:
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear install --alldeps phpunit/PHPUnit
答案2
对于 ubuntu 11.10 使用以下命令:
sudo apt-get install php-pear
sudo pear upgrade pear
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com
sudo pear install --alldeps phpunit/PHPUnit
答案3
不幸的是,PHPUnit 的 Debian 软件包已损坏,它不包含自 Natty 发布的版本以来 PHPUnit 所必需的几个类:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610676
因此我建议密切关注它并尝试大卫的解决方案。