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