/** * 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; } }
public function testExists() { $asset = new Asset('test.css', new Environment('tests/support/assets')); $this->assertEquals(TRUE, $asset->exists()); }