我试图在yii中使用phpunit
我按照指示从http://phpunit.de/manual/4.1/en/installation.html
安装它当我这样做的时候
phpunit protected/tests/unit/
这个错误发生
PHP Warning: require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/news/framework/test/CWebTestCase.php on line 12
当我试图安装SeleniumTestCase再次抛出
composer global require "phpunit/phpunit-selenium": ">=1.2"
Changed current directory to /home/qts1234/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
我能做什么?请帮助
使用composer全局安装selenium脚本不会将它们添加到包含路径中,也不会被自动加载器看到。
您应该将phpunit/phpunit-selenium
添加为开发依赖项,并让composer将其安装到您的项目中,以便您的引导程序可以加载自动加载器,并且您正在扩展的测试将被找到。