diff --git a/composer.json b/composer.json index 39ff413e00..b200035f08 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "doctrine/common": "~2.4", "paragonie/random_compat": "~1.0", "symfony/polyfill-apcu": "~1.1", + "symfony/polyfill-mbstring": "~1.1", "twig/twig": "~1.23|~2.0", "psr/log": "~1.0" }, diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index ac6c3288ae..4c055ff8a1 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -36,7 +36,13 @@ class BinaryFileResponseTest extends ResponseTestCase public function testConstructWithNonAsciiFilename() { - new BinaryFileResponse(__DIR__.'/Fixtures/föö.html', 200, array(), true, 'attachment'); + touch(sys_get_temp_dir().'/fööö.html'); + + $response = new BinaryFileResponse(sys_get_temp_dir().'/fööö.html', 200, array(), true, 'attachment'); + + @unlink(sys_get_temp_dir().'/fööö.html'); + + $this->assertSame('fööö.html', $response->getFile()->getFilename()); } /** diff --git a/src/Symfony/Component/HttpFoundation/Tests/Fixtures/föö.html b/src/Symfony/Component/HttpFoundation/Tests/Fixtures/föö.html deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index 8fa1a00ec9..c9cbfd02aa 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -16,7 +16,8 @@ } ], "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "~1.1" }, "autoload": { "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" },