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

问题描述

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

I'm using PHPUnit version 3.6.2, and always got

运行单个测试时:

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方法套件不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 13:14
查看更多