public function testRemoveDefaultPort()
{
$uri = $this->getMock('Psr\\Http\\Message\\UriInterface');
$uri->expects($this->any())->method('getScheme')->will($this->returnValue('http'));
$uri->expects($this->any())->method('getPort')->will($this->returnValue(80));
$uri->expects($this->once())->method('withPort')->with(null)->will($this->returnValue(new Uri('http://example.org')));
$normalizedUri = UriNormalizer::normalize($uri, UriNormalizer::REMOVE_DEFAULT_PORT);
$this->assertInstanceOf('Psr\\Http\\Message\\UriInterface', $normalizedUri);
$this->assertNull($normalizedUri->getPort());
}