setBasePath() 공개 메소드

The directory must be in namespace format.
public setBasePath ( $value )
예제 #1
0
 public function testSetBasePath()
 {
     $manager = new TAssetManager();
     // First try, invalid directory
     try {
         $manager->setBasePath('invalid');
         self::fail('Expected TInvalidDataValueException not thrown');
     } catch (TInvalidDataValueException $e) {
     }
     // Next, standard asset directory, should work
     $manager->setBasePath('AssetAlias');
     self::assertEquals(self::$assetDir, $manager->getBasePath());
     // Finally, test to change after init
     $manager->init(null);
     try {
         $manager->setBasePath('test');
         self::fail('Expected TInvalidOperationException not thrown');
     } catch (TInvalidOperationException $e) {
     }
 }