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