public function testPort() { $this->uri->initializeWithURL('http://localhost/a-page')->init(); $this->assertSame('80', $this->uri->port()); $this->uri->initializeWithURL('http://localhost:8080/a-page')->init(); $this->assertSame(8080, $this->uri->port()); $this->uri->initializeWithURL('http://localhost:443/a-page')->init(); $this->assertSame(443, $this->uri->port()); $this->uri->initializeWithURL('https://localhost/a-page')->init(); $this->assertSame('80', $this->uri->port()); }