19 $parser->setMacro(
'parent', $this->getMockBuilder(
'Twig_Node_Macro')->disableOriginalConstructor()->getMock());
61 $this->assertEquals($expected,
$parser->filterBodyNodes($input));
90 $parser->filterBodyNodes($input);
113 $twig =
new Twig_Environment($this->getMockBuilder(
'Twig_LoaderInterface')->getMock(), array(
114 'autoescape' =>
false,
115 'optimizations' => 0,
131 $this->assertNull(
$parser->getParent());
136 $twig =
new Twig_Environment($this->getMockBuilder(
'Twig_LoaderInterface')->getMock(), array(
137 'autoescape' =>
false,
138 'optimizations' => 0,
142{% from _self
import foo %}
153 $this->addToAssertionCount(1);
172 return parent::filterBodyNodes($node);
const EOF
How fgetc() reports an End Of File.
An exception for terminatinating execution or to throw for unit testing.
filterBodyNodes(Twig_NodeInterface $node)
parse(Twig_Token $token)
Parses a token and returns a node.
getTag()
Gets the tag name associated with this token parser.
Stores the Twig configuration.
Represents a node in the AST.
Default parser implementation.
Holds information about a non-compiled Twig template.
testUnknownTagWithoutSuggestions()
@expectedException Twig_Error_Syntax @expectedExceptionMessage Unknown "foobar" tag at line 1.
testFilterBodyNodesWithBOM()
@expectedException Twig_Error_Syntax @expectedExceptionMessage A template that extends another one ca...
getFilterBodyNodesDataThrowsException()
testFilterBodyNodesThrowsException($input)
@dataProvider getFilterBodyNodesDataThrowsException @expectedException Twig_Error_Syntax
testFilterBodyNodes($input, $expected)
@dataProvider getFilterBodyNodesData
testUnknownTag()
@expectedException Twig_Error_Syntax @expectedExceptionMessage Unknown "foo" tag.
testSetMacroThrowsExceptionOnReservedMethods()
@expectedException Twig_Error_Syntax
Base class for all token parsers.
Represents a token stream.
Represents a node in the AST.
$stream
PHP stream implementation.