diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test new file mode 100644 index 00000000..ec525501 --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test | |||
@@ -0,0 +1,19 @@ | |||
1 | --TEST-- | ||
2 | "iterable" test | ||
3 | --TEMPLATE-- | ||
4 | {{ foo is iterable ? 'ok' : 'ko' }} | ||
5 | {{ traversable is iterable ? 'ok' : 'ko' }} | ||
6 | {{ obj is iterable ? 'ok' : 'ko' }} | ||
7 | {{ val is iterable ? 'ok' : 'ko' }} | ||
8 | --DATA-- | ||
9 | return array( | ||
10 | 'foo' => array(), | ||
11 | 'traversable' => new ArrayIterator(array()), | ||
12 | 'obj' => new stdClass(), | ||
13 | 'val' => 'test', | ||
14 | ); | ||
15 | --EXPECT-- | ||
16 | ok | ||
17 | ok | ||
18 | ko | ||
19 | ko \ No newline at end of file | ||