From d1526499b8a155064f8b8e893b046392abfffabc Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Wed, 4 Aug 2021 23:12:43 +0200 Subject: [PATCH] Inline $tmpDir --- Tests/Functional/CovertTest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Tests/Functional/CovertTest.php b/Tests/Functional/CovertTest.php index f460b0e..3d72b71 100644 --- a/Tests/Functional/CovertTest.php +++ b/Tests/Functional/CovertTest.php @@ -34,15 +34,11 @@ */ class CovertTest extends TestCase { - private $tmpDir; - protected function setUp(): void { if (!class_exists(Psr7Request::class)) { $this->markTestSkipped('nyholm/psr7 is not installed.'); } - - $this->tmpDir = sys_get_temp_dir(); } /** @@ -233,7 +229,7 @@ public function responseProvider() private function createUploadedFile($content, $originalName, $mimeType, $error) { - $path = tempnam($this->tmpDir, uniqid()); + $path = tempnam(sys_get_temp_dir(), uniqid()); file_put_contents($path, $content); return new UploadedFile($path, $originalName, $mimeType, $error, true);