Пример #1
0
 public function testPaths()
 {
     $this->uri->initializeWithURL('http://localhost:8080/grav/it/ueper')->init();
     $this->assertSame(['grav', 'it', 'ueper'], $this->uri->paths());
     $this->uri->initializeWithURL('http://localhost:8080/grav/it/ueper:xxx')->init();
     $this->assertSame(['grav', 'it'], $this->uri->paths());
     $this->uri->initializeWithURL('http://localhost:8080/grav/it/ueper?test=x')->init();
     $this->assertSame(['grav', 'it', 'ueper'], $this->uri->paths());
     $this->uri->initializeWithURL('http://localhost:8080/a/b/c/d')->init();
     $this->assertSame(['a', 'b', 'c', 'd'], $this->uri->paths());
     $this->uri->initializeWithURL('http://localhost:8080/a/b/c/d/e/f/a/b/c/d/e/f/a/b/c/d/e/f')->init();
     $this->assertSame(['a', 'b', 'c', 'd', 'e', 'f', 'a', 'b', 'c', 'd', 'e', 'f', 'a', 'b', 'c', 'd', 'e', 'f'], $this->uri->paths());
 }