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

Method test_string_rep

lang/php/test/StringIOTest.php:72–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70 }
71
72 public function test_string_rep()
73 {
74 $writers_schema_json = '"null"';
75 $writers_schema = AvroSchema::parse($writers_schema_json);
76 $datum_writer = new AvroIODatumWriter($writers_schema);
77 $strio = new AvroStringIO();
78 $this->assertEquals('', $strio->string());
79 $dw = new AvroDataIOWriter($strio, $datum_writer, $writers_schema_json);
80 $dw->close();
81
82 $this->assertEquals(57, strlen($strio->string()),
83 AvroDebug::asciiString($strio->string()));
84
85 $read_strio = new AvroStringIO($strio->string());
86
87 $datum_reader = new AvroIODatumReader();
88 $dr = new AvroDataIOReader($read_strio, $datum_reader);
89 $read_data = $dr->data();
90 $datum_count = count($read_data);
91 $this->assertEquals(0, $datum_count);
92 }
93}

Callers

nothing calls this directly

Calls 6

assertEqualsMethod · 0.80
asciiStringMethod · 0.80
parseMethod · 0.65
closeMethod · 0.65
stringMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected