public function Twig_Tests_ExpressionParserTest::testMacroDefinitionDoesNotSupportNonNameVariableName

@expectedException Twig_Error_Syntax @expectedExceptionMessage An argument must be a name. Unexpected token "string" of value "a" ("name" expected) in "index" at line 1

File

drupal/core/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php, line 244

Class

Twig_Tests_ExpressionParserTest

Code

public function testMacroDefinitionDoesNotSupportNonNameVariableName() {
  $env = new Twig_Environment(new Twig_Loader_String(), array(
    'cache' => false,
    'autoescape' => false,
  ));
  $parser = new Twig_Parser($env);
  $parser
    ->parse($env
    ->tokenize('{% macro foo("a") %}{% endmacro %}', 'index'));
}