在yii中需要一次(PHPUnit/Extensions/SeleniumTestCase.php)

在yii中需要一次(PHPUnit/Extensions/SeleniumTestCase.php),phpunit,composer-php,yii-components,Phpunit,Composer Php,Yii Components,我想在yii中使用phpunit 我按照说明从中安装它 当我这样做的时候 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.ph

我想在yii中使用phpunit

我按照说明从中安装它

当我这样做的时候

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将其安装到您的项目中,这样您的引导程序就可以加载自动加载器,并可以找到您正在扩展的测试。

我已经按照上面所说的做了,安装了它和其他依赖项Invoker,DBunit等通过composer,文件如预期的那样位于供应商文件夹中,但我一直得到这个错误。还有其他建议吗?我在yii 1.1中。@Shad您是否在phpunit引导脚本中包含自动加载器?列出一些缺少的组件。