使用PEAR安装PHPUnit后,我无法运行PHPUnit测试。这是以下错误:
[rpteira@f-dev-rpteira tests]$ phpunit
PHP Warning: Module 'memcache' already loaded in Unknown on line 0
PHP Notice: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in /usr/share/php/Zend/Loader.php on line 266
PHP Warning: require_once(PHPUnit/Framework/TestCase.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Test/PHPUnit/ControllerTestCase.php on line 23
Warning: require_once(PHPUnit/Framework/TestCase.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Test/PHPUnit/ControllerTestCase.php on line 23
PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Framework/TestCase.php' (include_path='/home/rpteira/workspace/ums/api/trunk/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Test/PHPUnit/ControllerTestCase.php on line 23
Fatal error: require_once(): Failed opening required 'PHPUnit/Framework/TestCase.php' (include_path='/home/rpteira/workspace/ums/api/trunk/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Test/PHPUnit/ControllerTestCase.php on line 23
[rpteira@f-dev-rpteira tests]$
安装后我可以看到:
[rpteira@f-dev-rpteira tests]$ sudo find / -name PHPUnit
/tmp/ZendFramework-1.11.0/library/Zend/Test/PHPUnit
/tmp/ZendFramework-1.11.0/tests/Zend/Test/PHPUnit
/usr/share/php/Zend/Test/PHPUnit
/usr/share/php/Zend-2.0/Test/PHPUnit
/usr/share/pear/doc/PHPUnit
/usr/share/pear/PHPUnit
我尝试重新安装软件包但发生了同样的错误。
有任何帮助吗?
答案 0 :(得分:1)
不再支持通过PEAR安装PHP单元。请参阅phpunit.de。
如果您使用composer,您可能会发现安装和维护更容易。有关如何安装的详细说明,请参阅PHPUnit Documentation。