示例#1
0
 public function testInvalidUrl()
 {
     $this->setExpectedException('RuntimeException');
     $asset = new HttpAsset('http://invalid.com/foobar');
     $asset->load();
 }
示例#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;
 }