我刚刚升级到 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
因此我建议密切关注它并尝试大卫的解决方案。