ci: enable ext/intl
[awesomized/ext-ion] / tests / serialize / enum.phpt
1 --TEST--
2 ion\serialize/enum
3 --EXTENSIONS--
4 ion
5 --FILE--
6 TEST
7 <?php
8 enum e {
9 case a;
10 case b;
11 }
12 $s = ion\serialize(e::a);
13 echo $s,"\n";
14 var_dump(ion\unserialize($s));
15
16 enum i : int {
17 case a = 123;
18 case b = 456;
19 }
20 $s = ion\serialize(i::b);
21 echo $s,"\n";
22 var_dump(ion\unserialize($s));
23
24 enum s : string {
25 case a = "abc";
26 case b = "def";
27 }
28 $s = ion\serialize(s::a);
29 echo $s,"\n";
30 var_dump(ion\unserialize($s));
31 ?>
32 DONE
33 --EXPECTF--
34 TEST
35 E::e::a
36 enum(e::a)
37 E::i::b
38 enum(i::b)
39 E::s::a
40 enum(s::a)
41 DONE