Yaffs site version 1.1
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Fixtures / expressions / starts_with.test
1 --TEST--
2 Twig supports the "starts with" operator
3 --TEMPLATE--
4 {{ 'foo' starts with 'f' ? 'OK' : 'KO' }}
5 {{ not ('foo' starts with 'oo') ? 'OK' : 'KO' }}
6 {{ not ('foo' starts with 'foowaytoolong') ? 'OK' : 'KO' }}
7 {{ 'foo' starts      with 'f' ? 'OK' : 'KO' }}
8 {{ 'foo' starts
9 with 'f' ? 'OK' : 'KO' }}
10 {{ 'foo' starts with '' ? 'OK' : 'KO' }}
11 {{ '1' starts with true ? 'OK' : 'KO' }}
12 {{ '' starts with false ? 'OK' : 'KO' }}
13 {{ 'a' starts with false ? 'OK' : 'KO' }}
14 {{ false starts with '' ? 'OK' : 'KO' }}
15 --DATA--
16 return array()
17 --EXPECT--
18 OK
19 OK
20 OK
21 OK
22 OK
23 OK
24 KO
25 KO
26 KO
27 KO