mirror of
https://github.com/filegator/filegator.git
synced 2025-08-04 08:27:50 +02:00
fix/test: create empty zip archive is futile
This commit is contained in:
@@ -47,13 +47,7 @@ class Tmpfs implements Service, TmpfsInterface
|
|||||||
{
|
{
|
||||||
$filename = $this->sanitizeFilename($filename);
|
$filename = $this->sanitizeFilename($filename);
|
||||||
|
|
||||||
$realPath = $this->getPath().$filename;
|
return $this->getPath().$filename;
|
||||||
|
|
||||||
if (! is_file($realPath)) {
|
|
||||||
touch($realPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $realPath;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function read(string $filename): string
|
public function read(string $filename): string
|
||||||
|
@@ -38,7 +38,7 @@ class ArchiverTest extends TestCase
|
|||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCreatingArchive()
|
public function testCreatingEmptyArchive()
|
||||||
{
|
{
|
||||||
$storage = new Filesystem();
|
$storage = new Filesystem();
|
||||||
$storage->init([
|
$storage->init([
|
||||||
@@ -51,7 +51,7 @@ class ArchiverTest extends TestCase
|
|||||||
$uniqid = $this->archiver->createArchive($storage);
|
$uniqid = $this->archiver->createArchive($storage);
|
||||||
|
|
||||||
$this->assertNotNull($uniqid);
|
$this->assertNotNull($uniqid);
|
||||||
$this->assertFileExists(TEST_TMP_PATH.$uniqid);
|
$this->assertFileNotExists(TEST_TMP_PATH.$uniqid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAddingDirectoryWithFilesAndSubdir()
|
public function testAddingDirectoryWithFilesAndSubdir()
|
||||||
|
Reference in New Issue
Block a user