public function testHasPort() { $url = new Url('http://127.0.0.1:8000/'); $this->assertTrue($url->hasPort()); $url = new Url('http://127.0.0.1/'); $this->assertFalse($url->hasPort()); }