protected function Twig_Tests_ParserTest::getParser

4 calls to Twig_Tests_ParserTest::getParser()
Twig_Tests_ParserTest::testFilterBodyNodes in drupal/core/vendor/twig/twig/test/Twig/Tests/ParserTest.php
@dataProvider getFilterBodyNodesData
Twig_Tests_ParserTest::testFilterBodyNodesThrowsException in drupal/core/vendor/twig/twig/test/Twig/Tests/ParserTest.php
@dataProvider getFilterBodyNodesDataThrowsException @expectedException Twig_Error_Syntax
Twig_Tests_ParserTest::testFilterBodyNodesWithBOM in drupal/core/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 drupal/core/vendor/twig/twig/test/Twig/Tests/ParserTest.php
@expectedException Twig_Error_Syntax

File

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

Class

Twig_Tests_ParserTest

Code

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