File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 8
8
convertWarningsToExceptions =" true"
9
9
processIsolation =" false"
10
10
stopOnFailure =" false"
11
- syntaxCheck =" false"
12
11
bootstrap =" vendor/autoload.php"
13
12
>
14
13
<testsuites >
Original file line number Diff line number Diff line change @@ -101,11 +101,11 @@ protected function buildUploadableFile($data)
101
101
}
102
102
103
103
if (class_exists (GuzzleUploadedFile::class)) {
104
- return new GuzzleUploadedFile ($ data , count ($ data ), 0 );
104
+ return new GuzzleUploadedFile ($ data , strlen ($ data ), 0 );
105
105
}
106
106
107
107
if (class_exists (ZendUploadedFile::class)) {
108
- return new ZendUploadedFile ($ data , count ($ data ), 0 );
108
+ return new ZendUploadedFile ($ data , strlen ($ data ), 0 );
109
109
}
110
110
111
111
throw new \RuntimeException ('Could not create Stream. Check your config ' );
Original file line number Diff line number Diff line change @@ -199,4 +199,29 @@ public function getFragments()
199
199
[$ this ->createUri ('http://www.foo.com#foo%20bar ' ), 'foo%20bar ' ],
200
200
];
201
201
}
202
+
203
+ public function testUriModification1 ()
204
+ {
205
+ $ expected = 'https://0:0@0:1/0?0#0 ' ;
206
+ $ uri = $ this ->createUri ($ expected );
207
+
208
+ $ this ->assertSame ($ expected , (string ) $ uri );
209
+ }
210
+
211
+ public function testUriModification2 ()
212
+ {
213
+ $ expected = 'https://0:0@0:1/0?0#0 ' ;
214
+ $ uri = $ this
215
+ ->createUri ('' )
216
+ ->withHost ('0 ' )
217
+ ->withPort (1 )
218
+ ->withUserInfo ('0 ' , '0 ' )
219
+ ->withScheme ('https ' )
220
+ ->withPath ('/0 ' )
221
+ ->withQuery ('0 ' )
222
+ ->withFragment ('0 ' )
223
+ ;
224
+
225
+ $ this ->assertSame ($ expected , (string ) $ uri );
226
+ }
202
227
}
You can’t perform that action at this time.
0 commit comments