protected function setUp()
 {
     parent::setUp();
     set_time_limit(0);
     \Myfox\Lib\AutoLoad::init();
     \Myfox\Lib\AutoLoad::register('myfox\\app', __DIR__ . '/../app');
     \Myfox\Lib\Cache\Apc::cleanAllCache();
 }
 /**
  * 自动加载初始化
  *
  * @access public static
  * @return void
  */
 public static function setAutoLoad()
 {
     if (self::$autoloaded) {
         return;
     }
     require_once __DIR__ . '/../lib/autoload.php';
     \Myfox\Lib\AutoLoad::init();
     \Myfox\Lib\AutoLoad::register('myfox\\app', __DIR__);
     self::$autoloaded = true;
 }
 public function test_should_throw_class_not_found_when_class_not_in_file()
 {
     AutoLoad::register('com', __DIR__ . '/autoload/com');
     try {
         $case1 = new \Com\Aleafs\AutoLoadTestCaseClassNameNotMatched();
     } catch (\Exception $e) {
         $this->assertTrue($e instanceof \Myfox\Lib\Exception, 'Exception Type doesn\'t match,');
         $this->assertTrue((bool) preg_match('/^Class "(.+?)" NOT FOUND IN "(.+?)"/is', $e->getMessage()), 'Exception Message doesn\'t match.');
     }
 }
 protected function setUp()
 {
     parent::setUp();
     \Myfox\Lib\AutoLoad::register('myfox\\test\\factory', __DIR__ . '/factory');
 }