Пример #1
0
 public function testPathString()
 {
     $url = new CUrl("http://www.example.com/");
     $this->assertTrue($url->pathString()->equals("/"));
     $url = new CUrl("http://www.example.com/path/to/item");
     $this->assertTrue($url->pathString()->equals("/path/to/item"));
     $url = new CUrl("http://www.example.com/path/to/some%20item");
     $this->assertTrue($url->pathString()->equals("/path/to/some%20item"));
     $url = new CUrl("http://www.example.com/path/to/some%20ite%6D");
     $this->assertTrue($url->pathString()->equals("/path/to/some%20ite%6D"));
     $url = new CUrl("http://www.example.com/path/to/some%20ite%6D");
     $this->assertTrue($url->pathString(true)->equals("/path/to/some item"));
 }