Security update to Drupal 8.4.6
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Fixtures / expressions / ends_with.test
1 --TEST--
2 Twig supports the "ends with" operator
3 --TEMPLATE--
4 {{ 'foo' ends with 'o' ? 'OK' : 'KO' }}
5 {{ not ('foo' ends with 'f') ? 'OK' : 'KO' }}
6 {{ not ('foo' ends with 'foowaytoolong') ? 'OK' : 'KO' }}
7 {{ 'foo' ends with '' ? 'OK' : 'KO' }}
8 {{ '1' ends with true ? 'OK' : 'KO' }}
9 {{ 1 ends with true ? 'OK' : 'KO' }}
10 {{ 0 ends with false ? 'OK' : 'KO' }}
11 {{ '' ends with false ? 'OK' : 'KO' }}
12 {{ false ends with false ? 'OK' : 'KO' }}
13 {{ false ends with '' ? 'OK' : 'KO' }}
14 --DATA--
15 return array()
16 --EXPECT--
17 OK
18 OK
19 OK
20 OK
21 KO
22 KO
23 KO
24 KO
25 KO
26 KO