public function testGetPath() { $url = new \r8\URL(); $this->assertNull($url->getPath()); $url->setDir("dir/to"); $this->assertSame("/dir/to/", $url->getPath()); $url->setDir("/dir/to/"); $this->assertSame("/dir/to/", $url->getPath()); $url->setExt("php"); $this->assertSame("/dir/to/", $url->getPath()); $url->setFilename("Example"); $this->assertSame("/dir/to/Example.php", $url->getPath()); $url->clearExt(); $this->assertSame("/dir/to/Example", $url->getPath()); $url->clearDir(); $this->assertSame("Example", $url->getPath()); $url->setExt("php"); $this->assertSame("Example.php", $url->getPath()); $url->clearFilename()->clearExt(); $this->assertNull($url->getPath()); }