Beispiel #1
0
 public function testBase()
 {
     $this->uri->initializeWithURL('http://localhost/a-page')->init();
     $this->assertSame('http://localhost', $this->uri->base());
     $this->uri->initializeWithURL('http://localhost:8080/a-page')->init();
     $this->assertSame('http://localhost:8080', $this->uri->base());
     $this->uri->initializeWithURL('http://foobar.it:80/a-page')->init();
     $this->assertSame('http://foobar.it', $this->uri->base());
     $this->uri->initializeWithURL('https://google.com/a-page')->init();
     $this->assertSame('http://google.com', $this->uri->base());
 }