File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,10 @@ public function testSupportResources()
35
35
36
36
public function testResourcesWithStrangeNames ()
37
37
{
38
- $ basePath = __DIR__ .'/Resources/NonUtf8 ' ;
39
- $ files = scandir ($ basePath );
38
+ $ resource = fopen (__DIR__ .'/Resources/httplug.png ' , 'r ' );
40
39
41
40
$ builder = new MultipartStreamBuilder ();
42
- foreach ($ files as $ file ) {
43
- if (substr ($ file , 0 , 1 ) === '. ' ) {
44
- continue ;
45
- }
46
-
47
- $ builder ->addResource ('image ' , fopen ($ basePath .'/ ' .$ file , 'r ' ));
48
- }
49
-
41
+ $ builder ->addResource ('image ' , $ resource , ['filename ' =>'foo/bar/хлопот.png ' ]);
50
42
51
43
$ multipartStream = (string ) $ builder ->build ();
52
44
$ this ->assertTrue (false !== strpos ($ multipartStream , 'Content-Disposition: form-data; name="image"; filename="хлопот.png" ' ));
You can’t perform that action at this time.
0 commit comments