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__)); }
public function testFileExists() { $app = $this->getApp(); $handlers = $this->getTwigHandlers($app); $handlers['utils'] = $this->getMockHandler('UtilsHandler', 'fileExists'); $twig = new TwigExtension($app, $handlers, true); $twig->fileExists(null, null); }