PHPUnit抱怨Selenium

 思念如此难受_351 发布于 2023-01-15 19:44

很抱歉,如果这是微不足道的,但我没有找到任何建议如何解决这个问题.我在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测试工作?

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有