Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3c0a6ea

Browse filesBrowse files
committed
[Tests] Move expectException closer to the place of the expectation to avoid false positives
1 parent a04a950 commit 3c0a6ea
Copy full SHA for 3c0a6ea

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎Tests/Factory/HttpFoundationFactoryTest.php

Copy file name to clipboardExpand all lines: Tests/Factory/HttpFoundationFactoryTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ public function testCreateUploadedFile()
185185

186186
public function testCreateUploadedFileWithError()
187187
{
188-
$this->expectException(FileException::class);
189-
$this->expectExceptionMessage('The file "e" could not be written on disk.');
190-
191188
$uploadedFile = $this->createUploadedFile('Error.', \UPLOAD_ERR_CANT_WRITE, 'e', 'text/plain');
192189
$symfonyUploadedFile = $this->callCreateUploadedFile($uploadedFile);
193190

194191
$this->assertEquals(\UPLOAD_ERR_CANT_WRITE, $symfonyUploadedFile->getError());
195192

193+
$this->expectException(FileException::class);
194+
$this->expectExceptionMessage('The file "e" could not be written on disk.');
195+
196196
$symfonyUploadedFile->move($this->tmpDir, 'shouldFail.txt');
197197
}
198198

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.