public function testWithPortReturnsNewInstanceWithProvidedPort($port)
{
$uri = new Uri('https://user:[email protected]:3001/foo?bar=baz#quz');
$new = $uri->withPort($port);
$this->assertNotSame($uri, $new);
$this->assertEquals($port, $new->getPort());
$this->assertEquals(sprintf('https://user:[email protected]:%d/foo?bar=baz#quz', $port), (string) $new);
}