Skip to content

Commit cbf701a

Browse files
jakzalnicolas-grekas
authored andcommitted
[HttpFoundation] Add a dependency on the mbstring polyfill
1 parent 1471377 commit cbf701a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Tests/BinaryFileResponseTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ public function testConstruction()
3636

3737
public function testConstructWithNonAsciiFilename()
3838
{
39-
new BinaryFileResponse(__DIR__.'/Fixtures/föö.html', 200, array(), true, 'attachment');
39+
touch(sys_get_temp_dir().'/fööö.html');
40+
41+
$response = new BinaryFileResponse(sys_get_temp_dir().'/fööö.html', 200, array(), true, 'attachment');
42+
43+
@unlink(sys_get_temp_dir().'/fööö.html');
44+
45+
$this->assertSame('fööö.html', $response->getFile()->getFilename());
4046
}
4147

4248
/**

Tests/Fixtures/föö.html

Whitespace-only changes.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.3.3"
19+
"php": ">=5.3.3",
20+
"symfony/polyfill-mbstring": "~1.1"
2021
},
2122
"autoload": {
2223
"psr-0": { "Symfony\\Component\\HttpFoundation\\": "" },

0 commit comments

Comments
 (0)