mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 18:06:46 +00:00
Strengthen the default filter regression test
This commit is contained in:
@@ -456,6 +456,11 @@ class ExpressionParserTest extends TestCase
|
||||
['foo' => null],
|
||||
'',
|
||||
],
|
||||
[
|
||||
'{% for foo in foos %}[{{ foo?.bar|default(foo?.baz) }}]{% endfor %}',
|
||||
['foos' => [(object) ['bar' => 'corge', 'baz' => 'grault'], (object) ['baz' => 'qux']]],
|
||||
'[corge][qux]',
|
||||
],
|
||||
[
|
||||
'{{ foo?.bar|default(foo?.baz) }}',
|
||||
['foo' => (object) ['bar' => null, 'baz' => 'qux']],
|
||||
|
||||
Reference in New Issue
Block a user