Skip to content

Commit

Permalink
Remove usage of array() in fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 14, 2024
1 parent 6f3d173 commit 6091e7d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/Fixtures/extensions/anonymous_functions.test
Expand Up @@ -4,7 +4,7 @@ use an anonymous function as a function
{{ anon_foo('bar') }}
{{ 'bar'|anon_foo }}
--DATA--
return array()
return []
--EXPECT--
*bar*
*bar*
4 changes: 2 additions & 2 deletions tests/Fixtures/filters/column.test
Expand Up @@ -4,8 +4,8 @@
{{ array|column('foo')|join }}
{{ traversable|column('foo')|join }}
--DATA--
$items = array(array('bar' => 'foo', 'foo' => 'bar'), array('foo' => 'foo', 'bar' => 'bar'));
return array('array' => $items, 'traversable' => new ArrayIterator($items));
$items = [['bar' => 'foo', 'foo' => 'bar'], ['foo' => 'foo', 'bar' => 'bar']];
return ['array' => $items, 'traversable' => new ArrayIterator($items)];
--EXPECT--
barfoo
barfoo
2 changes: 1 addition & 1 deletion tests/Fixtures/functions/block_without_parent.test
Expand Up @@ -6,6 +6,6 @@
--TEMPLATE(parent.twig)--
{{ block('label') }}
--DATA--
return array()
return []
--EXCEPTION--
Twig\Error\RuntimeError: Block "label" should not call parent() in "index.twig" as the block does not exist in the parent template "parent.twig" in "index.twig" at line 3.
2 changes: 1 addition & 1 deletion tests/Fixtures/tags/block/conditional_block.test
Expand Up @@ -4,6 +4,6 @@ conditional "block" tag
{% if false %}{% block foo %}FOO{% endblock %}{% endif %}
{% if true %}{% block bar %}BAR{% endblock %}{% endif %}
--DATA--
return array()
return []
--EXPECT--
BAR
2 changes: 1 addition & 1 deletion tests/Fixtures/tags/inheritance/capturing_block.test
Expand Up @@ -12,6 +12,6 @@ capturing "block" tag with "extends" tag
{% block content %}{% endblock %}
{% block content1 %}{% endblock %}
--DATA--
return array()
return []
--EXPECT--
FOOBARFOO
2 changes: 1 addition & 1 deletion tests/Fixtures/tags/inheritance/conditional_block.test
Expand Up @@ -9,6 +9,6 @@ conditional "block" tag with "extends" tag
--TEMPLATE(layout.twig)--
{% block content %}{% endblock %}
--DATA--
return array()
return []
--EXCEPTION--
Twig\Error\SyntaxError: A block definition cannot be nested under non-capturing nodes in "index.twig" at line 5.

0 comments on commit 6091e7d

Please sign in to comment.