Example #1
0
 public function testToStringAndEscape()
 {
     $pathsToAdd = ['this is a path', 'that', 'needs to be', 'escaped'];
     foreach ($pathsToAdd as $path) {
         $this->_purl->getPath()->add($path);
     }
     $this->assertEquals('/path/this+is+a+path/that/needs+to+be/escaped', $this->_purl->getPath()->toString());
 }
Example #2
0
 public function testHostPort()
 {
     $this->assertEquals('hostname', $this->_purl->getHost());
     $this->assertEquals('80', $this->_purl->getPort());
 }