coreLoader = DI()->loader; } protected function tearDown() { } /** * @group testAddDirs */ public function testAddDirs() { $dirs = array('FirstDir', 'SecondDir'); $this->coreLoader->addDirs($dirs); } /** * @group testSetBasePath */ public function testSetBasePath() { $path = PHALAPI_ROOT; $rs = $this->coreLoader->setBasePath($path); } /** * @group testLoadFile */ public function testLoadFile() { $filePath = dirname(__FILE__) . '/test_file_for_loader.php'; $this->coreLoader->loadFile($filePath); } /** * @group testLoad */ public function testLoad() { $className = 'PhalApi_Api'; $rs = $this->coreLoader->load($className); } public function testLoadOnce() { $obj = new PhalApi_Logger_File('./', 0); } public function testRegisterAgain() { $loader = new PhalApi_Loader('./', array()); $loader = new PhalApi_Loader('./', array()); $obj = new PhalApi_DB_NotORM(array()); } public function testConstructAndAdd() { $loader = new PhalApi_Loader('./', array('./Config')); $loader->addDirs('./Data'); $loader->addDirs(array('./Crypt')); } }