public function testDomainAndPath() { $url = new Url('http://example.com/'); $this->assertEquals('example.com', $url->getDomain()); $this->assertEquals('', $url->getPath()); $url = new Url('http://example.com/Test'); $this->assertEquals('example.com', $url->getDomain()); $this->assertEquals('Test', $url->getPath()); $url = new Url('http://example.com/Second/Test/?a=asfd'); $this->assertEquals('example.com', $url->getDomain()); $this->assertEquals('Second/Test/?a=asfd', $url->getPath()); $this->assertEquals(false, $url->isRouted()); }