为了账号安全,请及时绑定邮箱和手机立即绑定

FuelPHP调用未定义的方法PHPUnit_Util_Configuration ::

FuelPHP调用未定义的方法PHPUnit_Util_Configuration ::

PHP
SMILET 2021-04-07 17:19:51
我在fuelphp单元测试代码上遇到错误。请建议我如何解决。我在Fuelphp中没有任何解决方案$ phpunit --versionPHPUnit 3.7.21 by Sebastian Bergmann.错误在这里$ php oil testTests Running...This may take a few moments.PHP Fatal error:  Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in D:\xampp\htdocs\basic\api\fuel\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1066Fatal error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in D:\xampp\htdocs\basic\api\fuel\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1066Fatal Error - Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in D:/xampp/htdocs/basic/api/fuel/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 1066我的测试代码在这里use Fuel\Core\Cli;use Fuel\Core\Config;/** * @command php oil test --group=Admins * @command for this only >>> php oil test --file=fuel/app/tests/controller/admins.php * @group Admins */class Test_Controller_Admins extends \TestCase {    public function test_action_detail() {        $this->assertTrue(true);    }    /**     * setUp method     *     * @return void     */    public function setUp() {        parent::setUp();    }    /**     * tearDown method     *     * @return void     */    public function tearDown() {        parent::tearDown();    }}
查看完整描述

2 回答

?
MMMHUHU

TA贡献1834条经验 获得超8个赞

通过Composer安装PHPUnit并使用Composer生成的自动加载器。然后,您不得使用以外的可执行文件调用PHPUnit vendor/bin/phpunit。


"require-dev": {

    "phpunit/phpunit": "*"

},


查看完整回答
反对 回复 2021-04-23
  • 2 回答
  • 0 关注
  • 219 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信