You are here

public function Twig_Tests_ExpressionParserTest::getMacroDefinitionSupportsConstantDefaultValues in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php \Twig_Tests_ExpressionParserTest::getMacroDefinitionSupportsConstantDefaultValues()

File

vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php, line 284

Class

Twig_Tests_ExpressionParserTest

Code

public function getMacroDefinitionSupportsConstantDefaultValues() {
  return array(
    array(
      '{% macro foo(name = "aa") %}{% endmacro %}',
    ),
    array(
      '{% macro foo(name = 12) %}{% endmacro %}',
    ),
    array(
      '{% macro foo(name = true) %}{% endmacro %}',
    ),
    array(
      '{% macro foo(name = ["a"]) %}{% endmacro %}',
    ),
    array(
      '{% macro foo(name = [["a"]]) %}{% endmacro %}',
    ),
    array(
      '{% macro foo(name = {a: "a"}) %}{% endmacro %}',
    ),
    array(
      '{% macro foo(name = {a: {b: "a"}}) %}{% endmacro %}',
    ),
  );
}