PhlyTest\Http\UriTest::testWithHostReturnsNewInstanceWithProvidedHost PHP Method

testWithHostReturnsNewInstanceWithProvidedHost() public method

    public function testWithHostReturnsNewInstanceWithProvidedHost()
    {
        $uri = new Uri('https://user:[email protected]:3001/foo?bar=baz#quz');
        $new = $uri->withHost('framework.zend.com');
        $this->assertNotSame($uri, $new);
        $this->assertEquals('framework.zend.com', $new->getHost());
        $this->assertEquals('https://user:[email protected]:3001/foo?bar=baz#quz', (string) $new);
    }
UriTest