I'm facing an awful problem ...
I can't use autoload in PHPUnit at all...
I have a bootstrap
Code: Select all
<?php
function myAutoload(){
trigger_error('we are using the autoload!',E_USER_ERROR);
exit;
}
spl_autoload_register('myAutoload');
?>
and my test class
Code: Select all
class ClassTest extends PHPUnit_Framework_TestCase{
public function test1(){
new UnexistantClass();
}
}
Thanks in advance
ps: I already tried to have the autoloader in the setUp method, it did not change a thing, I also tried with a simple __autoload()
=> Finally it was only because of the include path and that trigger_error in an autoload class is not caught by PHPUnit ...