MCPcopy Create free account
hub / github.com/apache/avro / test_write_read_false_round_trip

Method test_write_read_false_round_trip

lang/php/test/DataFileTest.php:165–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163 }
164
165 public function test_write_read_false_round_trip()
166 {
167 foreach (AvroDataIO::validCodecs() as $codec) {
168 if (
169 ($codec === AvroDataIO::SNAPPY_CODEC && !extension_loaded('snappy'))
170 || ($codec === AvroDataIO::ZSTANDARD_CODEC && !extension_loaded('zstd'))
171 ) {
172 continue;
173 }
174 $data_file = $this->add_data_file(sprintf('data-wr-false-%s.avr', $codec));
175 $writers_schema = '"boolean"';
176 $datum = false;
177 $dw = AvroDataIO::openFile($data_file, 'w', $writers_schema, $codec);
178 $dw->append($datum);
179 $dw->close();
180
181 $dr = AvroDataIO::openFile($data_file);
182 $read_data = $dr->data();
183 $read_datum = array_shift($read_data);
184 $dr->close();
185 $this->assertEquals($datum, $read_datum);
186 }
187 }
188
189 public function test_write_read_int_array_round_trip()
190 {

Callers

nothing calls this directly

Calls 7

add_data_fileMethod · 0.95
validCodecsMethod · 0.80
openFileMethod · 0.80
assertEqualsMethod · 0.80
closeMethod · 0.65
appendMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected