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 44f8828

Browse filesBrowse files
committed
minor #51299 [PsrHttpMessageBridge] Fix test case (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- [PsrHttpMessageBridge] Fix test case | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - On Windows, this test case fails with: ``` 1) Symfony\Bridge\PsrHttpMessage\Tests\Factory\PsrHttpFactoryTest::testUploadErrNoFile RuntimeException: The file "C:\projects\symfony" cannot be opened: fopen(C:\projects\symfony): Failed to open stream: Permission denied ``` The reason is that the empty string is turned into the empty directory, and you can't fopen a directory on Windows. The removed assertion have no purpose, they only check the behavior of the native SplFileInfo class. Commits ------- 9edd7b9788 [PsrHttpMessageBridge] Fix test case
2 parents e936c0b + a49cf0a commit 44f8828
Copy full SHA for 44f8828

File tree

1 file changed

+1
-4
lines changed
Filter options

1 file changed

+1
-4
lines changed

‎Tests/Factory/PsrHttpFactoryTest.php

Copy file name to clipboardExpand all lines: Tests/Factory/PsrHttpFactoryTest.php
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,7 @@ public function testCreateResponseFromBinaryFileWithRange()
211211

212212
public function testUploadErrNoFile()
213213
{
214-
$file = new UploadedFile('', '', null, \UPLOAD_ERR_NO_FILE, true);
215-
216-
$this->assertSame(\UPLOAD_ERR_NO_FILE, $file->getError());
217-
$this->assertFalse($file->getSize(), 'SplFile::getSize() returns false on error');
214+
$file = new UploadedFile(__FILE__, '', null, \UPLOAD_ERR_NO_FILE, true);
218215

219216
$request = new Request(
220217
[],

0 commit comments

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