Skip to content

Commit 043eb17

Browse files
committed
Add more URI class tests to fully illustrate current behavior
1 parent f5d899c commit 043eb17

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/system/HTTP/URITest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function testSegmentsIsPopulatedRightForMultipleSegments()
4949
$this->assertEquals('path', $uri->getSegment(1));
5050
$this->assertEquals('to', $uri->getSegment(2));
5151
$this->assertEquals('script', $uri->getSegment(3));
52+
$this->assertEquals('', $uri->getSegment(4));
5253

5354
$this->assertEquals(3, $uri->getTotalSegments());
5455
}
@@ -58,9 +59,8 @@ public function testSegmentsIsPopulatedRightForMultipleSegments()
5859
public function testSegmentOutOfRange()
5960
{
6061
$this->expectException(HTTPException::class);
61-
$url = 'http://abc.com/a123/b/c';
62-
$uri = new URI($url);
63-
$uri->getSegment(22);
62+
$uri = new URI('http://hostname/path/to/script');
63+
$uri->getSegment(5);
6464
}
6565

6666
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)