Exemplo n.º 1
0
 public function testIsEmpty()
 {
     $tmpFile = $this->createTempFile("tar_ustar_2_textfiles.tar");
     $charFile = new ezcArchiveCharacterFile($tmpFile);
     $this->assertFalse($charFile->isEmpty());
     $charFile->append("Blaap");
     $this->assertFalse($charFile->isEmpty());
     $charFile->truncate(1);
     $this->assertFalse($charFile->isEmpty());
     $charFile->append("Blaap");
     $this->assertFalse($charFile->isEmpty());
     $charFile->truncate();
     $this->assertTrue($charFile->isEmpty());
     $charFile->rewind();
     $charFile->append("blaap");
     $this->assertFalse($charFile->isEmpty());
     unset($charFile);
     $this->removeTempDir();
 }