From b225f9d2a97c29b25c6263b1f263daba94c1ee89 Mon Sep 17 00:00:00 2001 From: devanych Date: Fri, 28 Aug 2020 21:38:13 +0300 Subject: [PATCH] Fix temp file to UploadedFileCreatorTest --- tests/UploadedFileCreatorTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/UploadedFileCreatorTest.php b/tests/UploadedFileCreatorTest.php index ddb3ed7..c6c08e1 100644 --- a/tests/UploadedFileCreatorTest.php +++ b/tests/UploadedFileCreatorTest.php @@ -103,7 +103,7 @@ public function testCreateFromGlobalsOneFile(): void 'file' => [ 'name' => 'file.txt', 'type' => 'text/plain', - 'tmp_name' => '/tmp/phpn3FmFr', + 'tmp_name' => $this->tmpFile, 'error' => UPLOAD_ERR_OK, 'size' => 1024, ], @@ -132,8 +132,8 @@ public function testCreateFromGlobalsLinearMultipleNotStructuredFiles(): void 'file_2' => 'image/png', ], 'tmp_name' => [ - 'file_1' => '/tmp/phpN3FmFr', - 'file_2' => '/tmp/phpLs7DaJ', + 'file_1' => $this->tmpFile, + 'file_2' => $this->tmpFile, ], 'error' => [ 'file_1' => UPLOAD_ERR_OK, @@ -196,8 +196,8 @@ public function testCreateFromGlobalsNestedMultipleNotStructuredFiles(): void 'tmp_name' => [ 'data' => [ 'nested' => [ - 'file_1' => '/tmp/phpN3FmFr', - 'file_2' => '/tmp/phpLs7DaJ', + 'file_1' => $this->tmpFile, + 'file_2' => $this->tmpFile, ], ], ], @@ -256,14 +256,14 @@ public function testCreateFromGlobalsMultipleStructuredFiles(): void 'file_1' => [ 'name' => 'file.txt', 'type' => 'text/plain', - 'tmp_name' => '/tmp/phpN3FmFr', + 'tmp_name' => $this->tmpFile, 'error' => UPLOAD_ERR_OK, 'size' => 1024, ], 'file_2' => [ 'name' => 'image.png', 'type' => 'image/png', - 'tmp_name' => '/tmp/phpLs7DaJ', + 'tmp_name' => $this->tmpFile, 'error' => UPLOAD_ERR_OK, 'size' => 98760, ], @@ -290,14 +290,14 @@ public function testCreateFromGlobalsMultipleNestedStructuredFiles(): void 'file_1' => [ 'name' => ['file.txt', 'image.png'], 'type' => ['text/plain', 'image/png'], - 'tmp_name' => ['/tmp/phpN3FmFr', '/tmp/phpLs7DaJ'], + 'tmp_name' => [$this->tmpFile, $this->tmpFile], 'error' => [UPLOAD_ERR_OK, UPLOAD_ERR_OK], 'size' => [1024, 98760], ], 'file_2' => [ 'name' => ['audio.mp3', 'video.mp4'], 'type' => ['audio/x-mpeg-3', 'video/mp4'], - 'tmp_name' => ['/tmp/phpG7kMhl', '/tmp/phpUj4k9J'], + 'tmp_name' => [$this->tmpFile, $this->tmpFile], 'error' => [UPLOAD_ERR_OK, UPLOAD_ERR_OK], 'size' => [10245678, 98766432], ],