]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test
gitignore vendor
[github/wallabag/wallabag.git] / vendor / twig / twig / test / Twig / Tests / Fixtures / functions / attribute.test
1 --TEST--
2 "attribute" function
3 --TEMPLATE--
4 {{ attribute(obj, method) }}
5 {{ attribute(array, item) }}
6 {{ attribute(obj, "bar", ["a", "b"]) }}
7 --DATA--
8 return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo')
9 --EXPECT--
10 foo
11 bar
12 bar_a-b