コード例 #1
0
 public function testautoload()
 {
     //execute the method and test if it returns expected values
     //test with a invalid class .
     $result = SugarAutoLoader::autoload('foo');
     $this->assertFalse($result);
     //test with a valid class out of autoload mappings.
     $result = SugarAutoLoader::autoload('SugarArray');
     $this->assertFalse($result);
     //test with a valid class registered in autoload mappings
     $result = SugarAutoLoader::autoload('User');
     $this->assertTrue($result);
 }