]>
Commit | Line | Data |
---|---|---|
4f5b44bd NL |
1 | --TEST-- |
2 | Twig supports the in operator when using objects | |
3 | --TEMPLATE-- | |
4 | {% if object in object_list %} | |
5 | TRUE | |
6 | {% endif %} | |
7 | --DATA-- | |
8 | $foo = new TwigTestFoo(); | |
9 | $foo1 = new TwigTestFoo(); | |
10 | ||
11 | $foo->position = $foo1; | |
12 | $foo1->position = $foo; | |
13 | ||
14 | return array( | |
15 | 'object' => $foo, | |
16 | 'object_list' => array($foo1, $foo), | |
17 | ); | |
18 | --EXPECT-- | |
19 | TRUE |