Exemple #1
0
 public function testGetURL()
 {
     $url = new \r8\URL();
     $this->assertNull($url->getURL());
     $url->setBase("http://www.example.com/");
     $this->assertSame("http://www.example.com", $url->getURL());
     $url->setPath("/path/to/file.php");
     $this->assertSame("http://www.example.com/path/to/file.php", $url->getURL());
     $url->setQuery("one=single")->setFragment("frag");
     $this->assertSame("http://www.example.com/path/to/file.php?one=single#frag", $url->getURL());
 }