@@ -131,11 +131,13 @@ public function testSimpleUri()
131131 $ uri = new URI ($ url );
132132
133133 $ this ->assertSame ($ url , (string ) $ uri );
134+ $ this ->assertSame ('' , $ uri ->getPath ());
134135
135136 $ url = 'http://example.com/ ' ;
136137 $ uri = new URI ($ url );
137138
138139 $ this ->assertSame ($ url , (string ) $ uri );
140+ $ this ->assertSame ('/ ' , $ uri ->getPath ());
139141 }
140142
141143 public function testSimpleUriWithPath ()
@@ -144,11 +146,13 @@ public function testSimpleUriWithPath()
144146 $ uri = new URI ($ url );
145147
146148 $ this ->assertSame ($ url , (string ) $ uri );
149+ $ this ->assertSame ('/one/two ' , $ uri ->getPath ());
147150
148151 $ url = 'http://example.com/one/two/ ' ;
149152 $ uri = new URI ($ url );
150153
151154 $ this ->assertSame ($ url , (string ) $ uri );
155+ $ this ->assertSame ('/one/two/ ' , $ uri ->getPath ());
152156 }
153157
154158 public function testSimpleUriWithPathDoubleSlashes ()
@@ -157,11 +161,13 @@ public function testSimpleUriWithPathDoubleSlashes()
157161 $ uri = new URI ($ url );
158162
159163 $ this ->assertSame ('http://example.com/one/two/ ' , (string ) $ uri );
164+ $ this ->assertSame ('/one/two/ ' , $ uri ->getPath ());
160165
161166 $ url = 'http://example.com//one/two/ ' ;
162167 $ uri = new URI ($ url );
163168
164169 $ this ->assertSame ('http://example.com/one/two/ ' , (string ) $ uri );
170+ $ this ->assertSame ('/one/two/ ' , $ uri ->getPath ());
165171 }
166172
167173 public function testEmptyUri ()
0 commit comments