You are here

public function Twig_Tests_ParserTest::testGetVarName 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::testGetVarName()

File

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

Class

Twig_Tests_ParserTest

Code

public function testGetVarName() {
  $twig = new Twig_Environment($this
    ->getMock('Twig_LoaderInterface'), array(
    'autoescape' => false,
    'optimizations' => 0,
  ));
  $twig
    ->parse($twig
    ->tokenize(<<<EOF
{% from _self import foo %}

{% macro foo() %}
    {{ foo }}
{% endmacro %}
EOF
));
}