10968da02a271ba0a4954e57950c93edf9cee7a7
[awesomized/ext-ion] / tests / Reader / Options.phpt
1 --TEST--
2 ion\Reader\Options
3 --EXTENSIONS--
4 ion
5 --FILE--
6 TEST
7 <?php
8 $o = new ion\Reader\Options;
9 var_dump($o, clone $o);
10
11 $o = new ion\Reader\Options(
12 catalog: new ion\Catalog,
13 decimalContext: ion\Decimal\Context::Dec32(),
14 onContextChange: function(ion\Reader $r) {},
15 returnSystemValues: true,
16 skipCharacterValidation: true,
17 );
18 var_dump($o, clone $o);
19 ?>
20 DONE
21 --EXPECTF--
22 TEST
23 object(ion\Reader\Options)#%d (13) {
24 ["catalog"]=>
25 NULL
26 ["decimalContext"]=>
27 NULL
28 ["onContextChange"]=>
29 NULL
30 ["returnSystemValues"]=>
31 bool(false)
32 ["newLine"]=>
33 int(10)
34 ["maxContainerDepth"]=>
35 int(10)
36 ["maxAnnotations"]=>
37 int(10)
38 ["maxAnnotationBuffered"]=>
39 int(512)
40 ["symbolThreshold"]=>
41 int(16384)
42 ["userValueThreshold"]=>
43 int(16384)
44 ["chunkThreshold"]=>
45 int(16384)
46 ["allocationPageSize"]=>
47 int(65536)
48 ["skipCharacterValidation"]=>
49 bool(false)
50 }
51 object(ion\Reader\Options)#%d (13) {
52 ["catalog"]=>
53 NULL
54 ["decimalContext"]=>
55 NULL
56 ["onContextChange"]=>
57 NULL
58 ["returnSystemValues"]=>
59 bool(false)
60 ["newLine"]=>
61 int(10)
62 ["maxContainerDepth"]=>
63 int(10)
64 ["maxAnnotations"]=>
65 int(10)
66 ["maxAnnotationBuffered"]=>
67 int(512)
68 ["symbolThreshold"]=>
69 int(16384)
70 ["userValueThreshold"]=>
71 int(16384)
72 ["chunkThreshold"]=>
73 int(16384)
74 ["allocationPageSize"]=>
75 int(65536)
76 ["skipCharacterValidation"]=>
77 bool(false)
78 }
79 object(ion\Reader\Options)#%d (13) {
80 ["catalog"]=>
81 object(ion\Catalog)#%d (1) {
82 ["symbolTables":"ion\Catalog":private]=>
83 array(0) {
84 }
85 }
86 ["decimalContext"]=>
87 object(ion\Decimal\Context)#%d (5) {
88 ["digits"]=>
89 int(7)
90 ["eMax"]=>
91 int(96)
92 ["eMin"]=>
93 int(-95)
94 ["round"]=>
95 int(3)
96 ["clamp"]=>
97 bool(true)
98 }
99 ["onContextChange"]=>
100 object(Closure)#%d (1) {
101 ["parameter"]=>
102 array(1) {
103 ["$r"]=>
104 string(10) "<required>"
105 }
106 }
107 ["returnSystemValues"]=>
108 bool(true)
109 ["newLine"]=>
110 int(10)
111 ["maxContainerDepth"]=>
112 int(10)
113 ["maxAnnotations"]=>
114 int(10)
115 ["maxAnnotationBuffered"]=>
116 int(512)
117 ["symbolThreshold"]=>
118 int(16384)
119 ["userValueThreshold"]=>
120 int(16384)
121 ["chunkThreshold"]=>
122 int(16384)
123 ["allocationPageSize"]=>
124 int(65536)
125 ["skipCharacterValidation"]=>
126 bool(true)
127 }
128 object(ion\Reader\Options)#%d (13) {
129 ["catalog"]=>
130 object(ion\Catalog)#%d (1) {
131 ["symbolTables":"ion\Catalog":private]=>
132 array(0) {
133 }
134 }
135 ["decimalContext"]=>
136 object(ion\Decimal\Context)#%d (5) {
137 ["digits"]=>
138 int(7)
139 ["eMax"]=>
140 int(96)
141 ["eMin"]=>
142 int(-95)
143 ["round"]=>
144 int(3)
145 ["clamp"]=>
146 bool(true)
147 }
148 ["onContextChange"]=>
149 object(Closure)#%d (1) {
150 ["parameter"]=>
151 array(1) {
152 ["$r"]=>
153 string(10) "<required>"
154 }
155 }
156 ["returnSystemValues"]=>
157 bool(true)
158 ["newLine"]=>
159 int(10)
160 ["maxContainerDepth"]=>
161 int(10)
162 ["maxAnnotations"]=>
163 int(10)
164 ["maxAnnotationBuffered"]=>
165 int(512)
166 ["symbolThreshold"]=>
167 int(16384)
168 ["userValueThreshold"]=>
169 int(16384)
170 ["chunkThreshold"]=>
171 int(16384)
172 ["allocationPageSize"]=>
173 int(65536)
174 ["skipCharacterValidation"]=>
175 bool(true)
176 }
177 DONE