open(); $this->expectException(ChunkException::class); $r->writeChunk(0, 0, str_repeat("a", 1044476)); } public function testChunkMaxSize() : void{ $data = str_repeat("a", 1044475); $path = sys_get_temp_dir() . '/chunk_just_fits.testregion_' . bin2hex(random_bytes(4)); $r = new RegionLoader($path); $r->open(); $r->writeChunk(0, 0, $data); $r->close(); $r = new RegionLoader($path); $r->open(); self::assertSame($data, $r->readChunk(0, 0)); } }