public function testTwigExceptionAddsFileAndLineWhenMissing()
{
- $loader = new Twig_Loader_Array(array('index' => "\n\n{{ foo.bar }}"));
+ $loader = new Twig_Loader_Array(array('index' => "\n\n{{ foo.bar }}\n\n\n{{ 'foo' }}"));
$twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false));
$template = $twig->loadTemplate('index');
public function testRenderWrapsExceptions()
{
- $loader = new Twig_Loader_Array(array('index' => "\n\n\n{{ foo.bar }}"));
+ $loader = new Twig_Loader_Array(array('index' => "\n\n\n{{ foo.bar }}\n\n\n\n{{ 'foo' }}"));
$twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false));
$template = $twig->loadTemplate('index');
'index' => "{% extends 'base' %}
{% block content %}
{{ foo.bar }}
+ {% endblock %}
+ {% block foo %}
+ {{ foo.bar }}
{% endblock %}",
'base' => '{% block content %}{% endblock %}'
));