1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-06 15:36:28 +02:00

ZipInfo tests

This commit is contained in:
Ne-Lexa
2020-01-31 13:42:19 +03:00
parent 2235de6b35
commit 820c63c30f
3 changed files with 142 additions and 0 deletions

View File

@@ -2458,4 +2458,22 @@ class ZipFileTest extends ZipTestCase
}
$zipFile->close();
}
public function testNoData()
{
$this->setExpectedException(ZipException::class, 'No data for zip entry file');
$entryName = 'file';
$zipFile = new ZipFile();
try {
$zipFile[$entryName] = '';
$zipEntry = $zipFile->getEntry($entryName);
$zipEntry->setData(null);
$zipFile->getEntryContents($entryName);
} finally {
$zipFile->close();
}
}
}