diff --git a/Tests/Factory/HttpFoundationFactoryTest.php b/Tests/Factory/HttpFoundationFactoryTest.php index ed2b7e9..e40992e 100644 --- a/Tests/Factory/HttpFoundationFactoryTest.php +++ b/Tests/Factory/HttpFoundationFactoryTest.php @@ -172,7 +172,7 @@ public function testCreateUploadedFile() $symfonyUploadedFile = $this->callCreateUploadedFile($uploadedFile); $size = $symfonyUploadedFile->getSize(); - $uniqid = uniqid(); + $uniqid = uniqid('', true); $symfonyUploadedFile->move($this->tmpDir, $uniqid); $this->assertEquals($uploadedFile->getSize(), $size); @@ -198,7 +198,7 @@ public function testCreateUploadedFileWithError() private function createUploadedFile(string $content, int $error, string $clientFileName, string $clientMediaType): UploadedFile { - $filePath = tempnam($this->tmpDir, uniqid()); + $filePath = tempnam($this->tmpDir, uniqid('', true)); file_put_contents($filePath, $content); return new UploadedFile($filePath, filesize($filePath), $error, $clientFileName, $clientMediaType); diff --git a/Tests/Factory/PsrHttpFactoryTest.php b/Tests/Factory/PsrHttpFactoryTest.php index 41629e8..0c41221 100644 --- a/Tests/Factory/PsrHttpFactoryTest.php +++ b/Tests/Factory/PsrHttpFactoryTest.php @@ -131,7 +131,7 @@ public function testGetContentCanBeCalledAfterRequestCreation() private function createUploadedFile(string $content, string $originalName, string $mimeType, int $error): UploadedFile { - $path = tempnam($this->tmpDir, uniqid()); + $path = tempnam($this->tmpDir, uniqid('', true)); file_put_contents($path, $content); return new UploadedFile($path, $originalName, $mimeType, $error, true); @@ -182,7 +182,7 @@ public function testCreateResponseFromStreamed() public function testCreateResponseFromBinaryFile() { - $path = tempnam($this->tmpDir, uniqid()); + $path = tempnam($this->tmpDir, uniqid('', true)); file_put_contents($path, 'Binary'); $response = new BinaryFileResponse($path); @@ -194,7 +194,7 @@ public function testCreateResponseFromBinaryFile() public function testCreateResponseFromBinaryFileWithRange() { - $path = tempnam($this->tmpDir, uniqid()); + $path = tempnam($this->tmpDir, uniqid('', true)); file_put_contents($path, 'Binary'); $request = new Request(); diff --git a/Tests/Functional/CovertTest.php b/Tests/Functional/CovertTest.php index b0ea766..c350f29 100644 --- a/Tests/Functional/CovertTest.php +++ b/Tests/Functional/CovertTest.php @@ -217,7 +217,7 @@ public static function responseProvider(): array private static function createUploadedFile(string $content, string $originalName, string $mimeType, int $error): UploadedFile { - $path = tempnam(sys_get_temp_dir(), uniqid()); + $path = tempnam(sys_get_temp_dir(), uniqid('', true)); file_put_contents($path, $content); return new UploadedFile($path, $originalName, $mimeType, $error, true);