很抱歉,如果这是微不足道的,但我没有找到任何建议如何解决这个问题.我在Ubuntu上,我的Yii项目需要PHPUnit.我已经安装了两次PHPUnit,通过下载并将phpunit.phar移动到'/ usr/local/bin'并运行:
composer global require "phpunit/phpunit=3.7.*"
现在我正在尝试执行我的Yii PHPUnit测试:
phpunit unit/DbTest.php
而我得到的是:
PHP Warning: require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/yii-project/framework/test/CWebTestCase.php on line 12 PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Extensions/SeleniumTestCase.php' (include_path='.:/usr/share/php:/usr/share/pear') in /opt/lampp/htdocs/yii-project/framework/test/CWebTestCase.php on line 12
所以似乎找不到PHPUnit扩展SeleniumTestCase.php.然后,PHPUnit安装手册指出Selenium'包含在PHPUnit的PHAR发行版中.' 您能建议我如何使我的Yii测试工作?