PHPUnit ReflectionException方法套件不存在 [英] PHPUnit ReflectionException Method suite does not exist

查看:66
本文介绍了PHPUnit ReflectionException方法套件不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是PHPUnit 3.6.2版,并且总是得到

I'm using PHPUnit version 3.6.2, and always got

PHP ReflectionException:方法套件在第113行的/pathTo/pear/PHPUnit/Runner/BaseTestRunner.php中不存在

PHP ReflectionException: Method suite does not exist in /pathTo/pear/PHPUnit/Runner/BaseTestRunner.php on line 113

运行单个测试时:

phpunit path/to/my/ClassToTest.php

使用pear安装了PHPUnit,而我正在使用php 5.3.6

PHPUnit installed using pear, and I'm using php 5.3.6

我应该修复任何PHP配置吗? 或只是PHPUnit应该修复的东西.

are there any php configurations i should fix? or this just something that PHPUnit should fix.

班级

<?php

class ClassToTest extends PHPUnit_Framework_TestCase{

    public function testSomething(){
        $this->assertTrue(true);
    }

}

推荐答案

启用xdebug扩展后,我偶然发现了相同的消息.

I stumbled upon the same message after enabling xdebug extension.

尝试将其添加到您的php.ini中(或将此值注释为1的行):

Try adding this in your php.ini (or comment the line with the 1 for this value) :

    ; 0 is actually the default value
    xdebug.show_exception_trace = 0

这篇关于PHPUnit ReflectionException方法套件不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆