File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,16 @@ public function testSupportResources()
3535
3636 public function testResourcesWithStrangeNames ()
3737 {
38- $ resource = fopen (__DIR__ .'/Resources/httplug.png ' , 'r ' );
38+ $ originalLocale = setlocale (LC_ALL , "0 " );
39+ setlocale (LC_ALL , 'C ' );
3940
41+ $ resource = fopen (__DIR__ .'/Resources/httplug.png ' , 'r ' );
4042 $ builder = new MultipartStreamBuilder ();
41- $ builder ->addResource ('image ' , $ resource , ['filename ' =>' foo/bar/хлопотäκόσμε .png ' ]);
43+ $ builder ->addResource ('image ' , $ resource , ['filename ' => ' äa .png ' ]);
4244
4345 $ multipartStream = (string ) $ builder ->build ();
44- $ this ->assertTrue (false !== strpos ($ multipartStream , 'Content-Disposition: form-data; name="image"; filename="хлопотäκόσμε.png" ' ));
46+ $ this ->assertTrue (false !== mb_strpos ($ multipartStream , 'Content-Disposition: form-data; name="image"; filename="äa.png" ' ));
47+ setlocale (LC_ALL , $ originalLocale );
4548 }
4649
4750 public function testHeaders ()
You can’t perform that action at this time.
0 commit comments