Beispiel #1
0
 public function testTemplateParser()
 {
     $app = $this->getApp();
     $loader = $app['twig.loader'];
     $app['twig']->render('error.twig', ['context' => ['class' => 'BoltResponse', 'message' => 'Clippy is bent out of shape', 'code' => '1555', 'trace' => []]]);
     $templates = Library::parseTwigTemplates($loader);
     $this->assertEquals(1, count($templates));
     // Test deprecated function for now
     $this->assertEquals($templates, Library::hackislyParseRegexTemplates($loader));
 }
Beispiel #2
0
 public function testTemplateParser()
 {
     $app = $this->getApp();
     $loader = $app['twig.loader'];
     $template = $app['twig']->render('error.twig');
     $templates = Library::parseTwigTemplates($loader);
     $this->assertEquals(1, count($templates));
     // Test deprecated function for now
     $this->assertEquals($templates, Library::hackislyParseRegexTemplates($loader));
 }