/** * If the archive files aren't compressed, we should just be able to extract * the file data and use it as is. */ public function testExtractsUncompressedFileData() { $zip = new ZipInfo(); $zip->open($this->fixturesDir . '/little_file.zip'); $files = $zip->getFileList(); $this->assertCount(1, $files); $this->assertSame(0, $files[0]['compressed']); $data = $zip->getFileData($files[0]['name']); $this->assertSame($files[0]['size'], strlen($data)); $this->assertSame($files[0]['crc32'], dechex(crc32($data))); $this->assertSame("Some text.\n", $data); }