19 $stream = $lexer->tokenize(
'{{ foo }}',
'foo');
20 $this->assertEquals(
'foo',
$stream->getFilename());
21 $this->assertEquals(
'{{ foo }}',
$stream->getSource());
63 if (null === $value || $value ===
$token->getValue()) {
97 .
"bar{% line 10 %}{{\n" 114 $template =
'{# '.str_repeat(
'*', 100000).
' #}';
121 $this->addToAssertionCount(1);
126 $template =
'{% verbatim %}'.str_repeat(
'*', 100000).
'{% endverbatim %}';
133 $this->addToAssertionCount(1);
138 $template =
'{{ '.str_repeat(
'x', 100000).
' }}';
145 $this->addToAssertionCount(1);
150 $template =
'{% '.str_repeat(
'x', 100000).
' %}';
157 $this->addToAssertionCount(1);
162 $template =
'{{ 922337203685477580700 }}';
168 $this->assertEquals(
'922337203685477580700', $node->getValue());
174 "{{ 'foo \' bar' }}" =>
'foo \' bar',
175 '{{ "foo \" bar" }}' =>
'foo " bar',
185 $this->addToAssertionCount(1);
191 $template =
'foo {{ "bar #{ baz + 1 }" }}';
207 $this->addToAssertionCount(1);
222 $this->addToAssertionCount(1);
237 $this->addToAssertionCount(1);
254 $template =
'{{ "bar #{ "foo#{bar}" }" }}';
270 $this->addToAssertionCount(1);
275 $template =
'{% foo "bar #{ "foo#{bar}" }" %}';
292 $this->addToAssertionCount(1);
307 $this->addToAssertionCount(1);
testLineDirectiveInline()
testLegacyConstructorSignature()
legacy
testStringWithEscapedInterpolation()
testUnterminatedBlock()
Twig_Error_Syntax Unclosed "block" in "index" at line 3
countToken($template, $type, $value=null)
$stream
PHP stream implementation.
testNameLabelForFunction()
testUnterminatedVariable()
Twig_Error_Syntax Unclosed "variable" in "index" at line 3
const INTERPOLATION_END_TYPE
Holds information about a non-compiled Twig template.
testStringWithNestedInterpolations()
testStringWithUnterminatedInterpolation()
Twig_Error_Syntax Unclosed """
Stores the Twig configuration.
testStringWithEscapedDelimiter()
testStringWithInterpolation()
testOperatorEndingWithALetterAtTheEndOfALine()
const INTERPOLATION_START_TYPE
testStringWithNestedInterpolationsInBlock()