From 3337f692768da6302d0329985f256eaf572f90e0 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Mon, 3 Sep 2018 11:08:27 -0400 Subject: fix failing test --- tests/ArchiveTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/ArchiveTest.php b/tests/ArchiveTest.php index 8345ee4..393075d 100644 --- a/tests/ArchiveTest.php +++ b/tests/ArchiveTest.php @@ -10,12 +10,20 @@ use Pablotron\ZipStream\StreamWriter; final class ArchiveTest extends BaseTestCase { public function testCreate() : void { - $zip = new ZipStream('test.zip'); + $zip_path = tempnam('/tmp', 'zipstream-test'); + + $zip = new ZipStream($zip_path, [ + 'output' => new FileWriter(), + ]); $this->assertInstanceOf( ZipStream::class, $zip ); + + # close archive and remove temp file + $zip->close(); + unlink($zip_path); } public function testFileWriter() { -- cgit v1.2.3