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 88 convertWarningsToExceptions =" true"
99 processIsolation =" false"
1010 stopOnFailure =" false"
11- syntaxCheck =" false"
1211 bootstrap =" vendor/autoload.php"
1312 >
1413 <testsuites >
Original file line number Diff line number Diff line change @@ -101,11 +101,11 @@ protected function buildUploadableFile($data)
101101 }
102102
103103 if (class_exists (GuzzleUploadedFile::class)) {
104- return new GuzzleUploadedFile ($ data , count ($ data ), 0 );
104+ return new GuzzleUploadedFile ($ data , strlen ($ data ), 0 );
105105 }
106106
107107 if (class_exists (ZendUploadedFile::class)) {
108- return new ZendUploadedFile ($ data , count ($ data ), 0 );
108+ return new ZendUploadedFile ($ data , strlen ($ data ), 0 );
109109 }
110110
111111 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()
199199 [$ this ->createUri ('http://www.foo.com#foo%20bar ' ), 'foo%20bar ' ],
200200 ];
201201 }
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+ }
202227}
You can’t perform that action at this time.
0 commit comments