File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,6 +138,32 @@ public function testSimpleUri()
138138 $ this ->assertSame ($ url , (string ) $ uri );
139139 }
140140
141+ public function testSimpleUriWithPath ()
142+ {
143+ $ url = 'http://example.com/one/two ' ;
144+ $ uri = new URI ($ url );
145+
146+ $ this ->assertSame ($ url , (string ) $ uri );
147+
148+ $ url = 'http://example.com/one/two/ ' ;
149+ $ uri = new URI ($ url );
150+
151+ $ this ->assertSame ($ url , (string ) $ uri );
152+ }
153+
154+ public function testSimpleUriWithPathDoubleSlashes ()
155+ {
156+ $ url = 'http://example.com/one/two// ' ;
157+ $ uri = new URI ($ url );
158+
159+ $ this ->assertSame ('http://example.com/one/two/ ' , (string ) $ uri );
160+
161+ $ url = 'http://example.com//one/two/ ' ;
162+ $ uri = new URI ($ url );
163+
164+ $ this ->assertSame ('http://example.com/one/two/ ' , (string ) $ uri );
165+ }
166+
141167 public function testEmptyUri ()
142168 {
143169 $ url = '' ;
@@ -979,6 +1005,7 @@ public function testEmptyURIPath()
9791005 $ url = 'http://example.com/ ' ;
9801006 $ uri = new URI ($ url );
9811007
1008+ $ this ->assertSame ('/ ' , $ uri ->getPath ());
9821009 $ this ->assertSame ([], $ uri ->getSegments ());
9831010 $ this ->assertSame (0 , $ uri ->getTotalSegments ());
9841011 }
You can’t perform that action at this time.
0 commit comments