Exemplo n.º 1
0
 public function testSegmentsIsPopulatedRightForMultipleSegments()
 {
     $uri = new URI('http://hostname/path/to/script');
     $this->assertEquals(['path', 'to', 'script'], $uri->getSegments());
     $this->assertEquals('path', $uri->getSegment(1));
     $this->assertEquals('to', $uri->getSegment(2));
     $this->assertEquals('script', $uri->getSegment(3));
     $this->assertEquals(3, $uri->getTotalSegments());
 }