load() public method

Autoload callback for loading class files.
public load ( string $class ) : void
$class string Class to load
return void
Esempio n. 1
0
 /**
  * Tests that the autoloader can successfully autoload a class.
  *
  * @runInSeparateProcess
  * @depends testRegisterAutoloader
  * @return void
  */
 public function testLoad()
 {
     // Need this to load PHPUnit classes inside the separate process
     Phergie_Autoload::registerAutoloader();
     $class = 'Phergie_Bot';
     $autoload = new Phergie_Autoload();
     $this->assertFalse(class_exists($class, false));
     $autoload->load($class);
     $this->assertTrue(class_exists($class, false));
 }
Esempio n. 2
0
 /**
  * Tests that the autoloader can successfully autoload a class.
  *
  * @runInSeparateProcess
  * @return void
  */
 public function testLoad()
 {
     $class = 'Phergie_Bot';
     $this->assertFalse(class_exists($class, false));
     $autoload = new Phergie_Autoload();
     $autoload->load($class);
     $this->assertTrue(class_exists($class, false));
 }