PhlyTest\Http\UriTest::testWithPathReturnsNewInstanceWithProvidedPath PHP Method

testWithPathReturnsNewInstanceWithProvidedPath() public method

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