You are here

protected function Twig_Tests_ParserTest::getParser in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/test/Twig/Tests/ParserTest.php \Twig_Tests_ParserTest::getParser()
4 calls to Twig_Tests_ParserTest::getParser()
Twig_Tests_ParserTest::testFilterBodyNodes in vendor/twig/twig/test/Twig/Tests/ParserTest.php
@dataProvider getFilterBodyNodesData
Twig_Tests_ParserTest::testFilterBodyNodesThrowsException in vendor/twig/twig/test/Twig/Tests/ParserTest.php
@dataProvider getFilterBodyNodesDataThrowsException @expectedException Twig_Error_Syntax
Twig_Tests_ParserTest::testFilterBodyNodesWithBOM in vendor/twig/twig/test/Twig/Tests/ParserTest.php
@expectedException Twig_Error_Syntax @expectedExceptionMessage A template that extends another one cannot have a body but a byte order mark (BOM) has been detected; it must be removed at line 1.
Twig_Tests_ParserTest::testSetMacroThrowsExceptionOnReservedMethods in vendor/twig/twig/test/Twig/Tests/ParserTest.php
@expectedException Twig_Error_Syntax

File

vendor/twig/twig/test/Twig/Tests/ParserTest.php, line 138

Class

Twig_Tests_ParserTest

Code

protected function getParser() {
  $parser = new TestParser(new Twig_Environment($this
    ->getMock('Twig_LoaderInterface')));
  $parser
    ->setParent(new Twig_Node());
  $parser->stream = $this
    ->getMockBuilder('Twig_TokenStream')
    ->disableOriginalConstructor()
    ->getMock();
  return $parser;
}