diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test new file mode 100644 index 00000000..746295f1 --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test | |||
@@ -0,0 +1,37 @@ | |||
1 | --TEST-- | ||
2 | "batch" filter | ||
3 | --TEMPLATE-- | ||
4 | <table> | ||
5 | {% for row in items|batch(3, 'fill') %} | ||
6 | <tr> | ||
7 | {% for column in row %} | ||
8 | <td>{{ column }}</td> | ||
9 | {% endfor %} | ||
10 | </tr> | ||
11 | {% endfor %} | ||
12 | </table> | ||
13 | --DATA-- | ||
14 | return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) | ||
15 | --EXPECT-- | ||
16 | <table> | ||
17 | <tr> | ||
18 | <td>a</td> | ||
19 | <td>b</td> | ||
20 | <td>c</td> | ||
21 | </tr> | ||
22 | <tr> | ||
23 | <td>d</td> | ||
24 | <td>e</td> | ||
25 | <td>f</td> | ||
26 | </tr> | ||
27 | <tr> | ||
28 | <td>g</td> | ||
29 | <td>h</td> | ||
30 | <td>i</td> | ||
31 | </tr> | ||
32 | <tr> | ||
33 | <td>j</td> | ||
34 | <td>fill</td> | ||
35 | <td>fill</td> | ||
36 | </tr> | ||
37 | </table> | ||