Beispiel #1
0
 /**
  * Search for a file on the filesystem and create a new
  * wrapper instance to represent it
  *
  * @var string $filename The path + name of the file
  * @return Sherlock\Asset The asset object
  **/
 public function find($filename)
 {
     $asset = new Asset($filename, $this);
     if (!$asset->exists()) {
         throw new Exceptions\MissingFile($filename);
     } else {
         return $asset;
     }
 }
Beispiel #2
0
 public function testExists()
 {
     $asset = new Asset('test.css', new Environment('tests/support/assets'));
     $this->assertEquals(TRUE, $asset->exists());
 }