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()
35
35
36
36
public function testResourcesWithStrangeNames ()
37
37
{
38
- $ resource = fopen (__DIR__ .'/Resources/httplug.png ' , 'r ' );
38
+ $ originalLocale = setlocale (LC_ALL , "0 " );
39
+ setlocale (LC_ALL , 'C ' );
39
40
41
+ $ resource = fopen (__DIR__ .'/Resources/httplug.png ' , 'r ' );
40
42
$ builder = new MultipartStreamBuilder ();
41
- $ builder ->addResource ('image ' , $ resource , ['filename ' =>' foo/bar/хлопотäκόσμε .png ' ]);
43
+ $ builder ->addResource ('image ' , $ resource , ['filename ' => ' äa .png ' ]);
42
44
43
45
$ 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 );
45
48
}
46
49
47
50
public function testHeaders ()
You can’t perform that action at this time.
0 commit comments