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