public function Twig_Tests_ExpressionParserTest::testMacroDefinitionDoesNotSupportNonConstantDefaultValues

@expectedException Twig_Error_Syntax @expectedExceptionMessage A default value for an argument must be a constant (a boolean, a string, a number, or an array) in "index" at line 1 @dataProvider getMacroDefinitionDoesNotSupportNonConstantDefaultValues

File

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

Class

Twig_Tests_ExpressionParserTest

Code

public function testMacroDefinitionDoesNotSupportNonConstantDefaultValues($template) {
  $env = new Twig_Environment(new Twig_Loader_String(), array(
    'cache' => false,
    'autoescape' => false,
  ));
  $parser = new Twig_Parser($env);
  $parser
    ->parse($env
    ->tokenize($template, 'index'));
}