diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test new file mode 100644 index 00000000..8e08061b --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test | |||
@@ -0,0 +1,19 @@ | |||
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 | ||