PhlyTest\Http\UriTest::testWithUserInfoReturnsNewInstanceWithProvidedUserAndPassword PHP Method

testWithUserInfoReturnsNewInstanceWithProvidedUserAndPassword() public method

    public function testWithUserInfoReturnsNewInstanceWithProvidedUserAndPassword()
    {
        $uri = new Uri('https://user:[email protected]:3001/foo?bar=baz#quz');
        $new = $uri->withUserInfo('matthew', 'zf2');
        $this->assertNotSame($uri, $new);
        $this->assertEquals('matthew:zf2', $new->getUserInfo());
        $this->assertEquals('https://matthew:[email protected]:3001/foo?bar=baz#quz', (string) $new);
    }
UriTest