public function testRenameEntryPasswd() { copy($this->filesDir . '/testPasswd.7z', $this->tmpDir . '/test.7z'); $obj = new Archive7z($this->tmpDir . '/test.7z', $this->cliPath); $obj->setPassword('123'); $obj->renameEntry('test' . DIRECTORY_SEPARATOR . 'test.txt', 'test' . DIRECTORY_SEPARATOR . 'newTest.txt'); $resultSrc = $obj->getEntry('test' . DIRECTORY_SEPARATOR . 'test.txt'); self::assertNull($resultSrc); $resultDest = $obj->getEntry('test' . DIRECTORY_SEPARATOR . 'newTest.txt'); self::assertInstanceOf('Archive7z\\Entry', $resultDest); }
public function testChangeSystemLocaleFail() { $new = new Archive7z($this->tmpDir . '/test.7z', $this->cliPath); $new->setChangeSystemLocale(true); $this->setExpectedException('Archive7z\\Exception'); $new->getContent('file.txt'); }