public function test_blockdata() { $tar = new Tar(); $tar->setCompression(0); $tar->create(); $tar->addData('block.txt', str_pad('', 512, 'x')); $file = $tar->getArchive(); $this->assertEquals(512 * 4, strlen($file)); // 1 header block + data block + 2 footer blocks }