]> git.immae.eu Git - github/wallabag/wallabag.git/blame - vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test
gitignore vendor
[github/wallabag/wallabag.git] / vendor / twig / twig / test / Twig / Tests / Fixtures / expressions / magic_call.test
CommitLineData
4f5b44bd
NL
1--TEST--
2Twig supports __call() for attributes
3--TEMPLATE--
4{{ foo.foo }}
5{{ foo.bar }}
6--DATA--
7class TestClassForMagicCallAttributes
8{
9 public function getBar()
10 {
11 return 'bar_from_getbar';
12 }
13
14 public function __call($method, $arguments)
15 {
16 if ('foo' === $method)
17 {
18 return 'foo_from_call';
19 }
20
21 return false;
22 }
23}
24return array('foo' => new TestClassForMagicCallAttributes())
25--EXPECT--
26foo_from_call
27bar_from_getbar