我按书安装了
PHPUnit:
原文链接:https://www.f2er.com/php/133817.htmlsudo pear channel-discover pear.PHPunit.de sudo pear install PHPunit/PHPUnit
include路径添加在/etc/PHP5/cli/PHP.ini中
include_path = ".:/usr/share/PHP" $ls /usr/share/PHP/PHPUnit/ Extensions Framework
但现在,如果我想运行Zend Framework的测试
user@server:/var/www/page/tests$./runtests.sh + PHPunit --verbose AllTests ./runtests.sh: line 72: PHPunit: command not found user@server:/var/www/page/tests$PHP AllTests.PHP PHP Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /var/www/page/tests/Zend/Acl/AclTest.PHP on line 37
当然,当我尝试遵循Zend Framework Context之外的PHPUnit Manual http://www.phpunit.de/manual/3.6/en/writing-tests-for-phpunit.html中的指令时,我也会得到一个PHPunit:command.
我得到的感觉我在这里缺少必要的东西……
解决了
看起来PEAR频道存在问题,在添加其他2之后再次,它工作:
pear channel-discover components.ez.no pear channel-discover pear.symfony-project.com