コード例 #1
0
ファイル: HttpAssetTest.php プロジェクト: selimcr/servigases
 public function testSourceMetadata()
 {
     $asset = new HttpAsset(self::JQUERY);
     $this->assertEquals('http://ajax.googleapis.com', $asset->getSourceRoot(), '->__construct() set the source root');
     $this->assertEquals('ajax/libs/jquery/1.6.1/jquery.min.js', $asset->getSourcePath(), '->__construct() set the source path');
     $this->assertEquals('http://ajax.googleapis.com/ajax/libs/jquery/1.6.1', $asset->getSourceDirectory(), '->__construct() sets the source directory');
 }
コード例 #2
0
ファイル: assets.php プロジェクト: boltphp/core
 public function getFile($path)
 {
     if (strtolower(substr($path, 0, 4)) === 'http') {
         $f = new HttpAsset($path);
         $f->load();
     } else {
         $f = new FileAsset($path);
         $f->load();
     }
     return $f;
 }