public function testIsDefaultPort()
{
$defaultPortUrls = array('http://example.org/', 'http://example.org:80/', 'https://example.org/', 'https://example.org:443/');
$customPortUrls = array('http://example.org:443/', 'https://example.org:80/', 'http://example.org:8080/', 'https://example.org:8090/');
foreach ($defaultPortUrls as $urlString) {
$url = new Http\Url($urlString);
$this->assertTrue($url->isPortDefault(), "port should be default in {$urlString}");
}
foreach ($customPortUrls as $urlString) {
$url = new Http\Url($urlString);
$this->assertFalse($url->isPortDefault(), "port should not be default in {$urlString}");
}
}