I'm using PHPUnit version 3.6.2, and always got
PHP ReflectionException: Method suite does not exist in /pathTo/pear/PHPUnit/Runner/BaseTestRunner.php on line 113
when running single test:
phpunit path/to/my/ClassToTest.php
PHPUnit installed using pear, and I'm using php 5.3.6
are there any php configurations i should fix? or this just something that PHPUnit should fix.
the class
<?php
class ClassToTest extends PHPUnit_Framework_TestCase{
public function testSomething(){
$this->assertTrue(true);
}
}
I stumbled upon the same message after enabling xdebug extension.
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
If you're using VS Code and getting this exception while trying to debug your unit tests, make sure the Everything box is not checked in Breakpoints pane. Unchecking that box got me rid of this issue:
To understand why "show_exception_trace=1" causes this problem, see: Why does PHPUnit hide my xdebug backtrace?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With