public function fileExists($fn)
{
return $this->handlers['utils']->fileExists($fn, $this->safe);
}
public function testFileExists() { $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, false); $this->assertTrue($twig->fileExists(__FILE__)); // Test safe returns false $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $twig = new TwigExtension($app, $handlers, true); $this->assertFalse($twig->fileExists(__FILE__)); }