getBasePath() public method

public getBasePath ( ) : string
return string the root directory storing published asset files
Ejemplo n.º 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) {
     }
 }