PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Aug 20, 2018 4:31 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat May 08, 2010 5:26 pm 
Offline
Forum Commoner

Joined: Sun Apr 04, 2010 2:07 pm
Posts: 67
Location: Edinburgh
Hi everyone!

I'm facing an awful problem ...
I can't use autoload in PHPUnit at all...
I have a bootstrap
Syntax: [ Download ] [ Hide ]
<?php
 function myAutoload(){
         trigger_error('we are using the autoload!',E_USER_ERROR);
          exit;
}
 spl_autoload_register('myAutoload');
?>
 

and I call PHPUnit with php phpunit --bootstrap bootstrap.php testClass.php

and my test class
Syntax: [ Download ] [ Hide ]
 class ClassTest extends PHPUnit_Framework_TestCase{
   

    public function test1(){
        new UnexistantClass();
    }
}
 


but ... the autoloader is never called ... what should I do !?

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 ...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group