mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-07-30 20:20:11 +02:00
issue #8 - Support inline Content-Disposition and empty output filename.
This commit is contained in:
@@ -30,7 +30,7 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testOpenFileCantOpen()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
if (0 === posix_getuid()) {
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
@@ -1007,7 +1007,7 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testExtractFail3()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
if (0 === posix_getuid()) {
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
@@ -1213,7 +1213,7 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testAddFileCantOpen()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
if (0 === posix_getuid()) {
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
@@ -1501,7 +1501,7 @@ class ZipFileTest extends ZipTestCase
|
||||
*/
|
||||
public function testSaveAsFileNotWritable()
|
||||
{
|
||||
if (0 === posix_getuid()){
|
||||
if (0 === posix_getuid()) {
|
||||
$this->markTestSkipped('Skip the test for a user with root privileges');
|
||||
}
|
||||
|
||||
@@ -1662,26 +1662,6 @@ class ZipFileTest extends ZipTestCase
|
||||
$zipFile->addEmptyDir("");
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \PhpZip\Exception\InvalidArgumentException
|
||||
* @expectedExceptionMessage Output filename is empty.
|
||||
*/
|
||||
public function testOutputAsAttachmentNullName()
|
||||
{
|
||||
$zipFile = new ZipFile();
|
||||
$zipFile->outputAsAttachment(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \PhpZip\Exception\InvalidArgumentException
|
||||
* @expectedExceptionMessage Output filename is empty.
|
||||
*/
|
||||
public function testOutputAsAttachmentEmptyName()
|
||||
{
|
||||
$zipFile = new ZipFile();
|
||||
$zipFile->outputAsAttachment('');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \PhpZip\Exception\ZipNotFoundEntry
|
||||
* @expectedExceptionMessage Zip entry bad entry name not found
|
||||
@@ -1916,18 +1896,6 @@ class ZipFileTest extends ZipTestCase
|
||||
$this->assertInstanceOf(ResponseInterface::class, $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \PhpZip\Exception\InvalidArgumentException
|
||||
* @expectedExceptionMessage Output filename is empty.
|
||||
*/
|
||||
public function testInvalidPsrResponse()
|
||||
{
|
||||
$zipFile = new ZipFile();
|
||||
$zipFile['file'] = 'content';
|
||||
$response = $this->getMock(ResponseInterface::class);
|
||||
$zipFile->outputAsResponse($response, '');
|
||||
}
|
||||
|
||||
public function testCompressionLevel()
|
||||
{
|
||||
$zipFile = new ZipFile();
|
||||
|
Reference in New Issue
Block a user