Skip to content

Commit 321635b

Browse files
committed
do not use uniqid() in tests
updates the remaining tests that were not covered by #57665
1 parent 5f48017 commit 321635b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/Factory/HttpFoundationFactoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ public function testCreateUploadedFile()
172172
$symfonyUploadedFile = $this->callCreateUploadedFile($uploadedFile);
173173
$size = $symfonyUploadedFile->getSize();
174174

175-
$uniqid = uniqid();
176-
$symfonyUploadedFile->move($this->tmpDir, $uniqid);
175+
$filename = 'upload';
176+
$symfonyUploadedFile->move($this->tmpDir, $filename);
177177

178178
$this->assertEquals($uploadedFile->getSize(), $size);
179179
$this->assertEquals(\UPLOAD_ERR_OK, $symfonyUploadedFile->getError());
180180
$this->assertEquals('myfile.txt', $symfonyUploadedFile->getClientOriginalName());
181181
$this->assertEquals('txt', $symfonyUploadedFile->getClientOriginalExtension());
182182
$this->assertEquals('text/plain', $symfonyUploadedFile->getClientMimeType());
183-
$this->assertEquals('An uploaded file.', file_get_contents($this->tmpDir.'/'.$uniqid));
183+
$this->assertEquals('An uploaded file.', file_get_contents($this->tmpDir.'/'.$filename));
184184
}
185185

186186
public function testCreateUploadedFileWithError()

0 commit comments

Comments
 (0)