GuzzleHttp\Tests\Psr7\UriTest::testPortPassedAsStringIsCastedToInt PHP Method

testPortPassedAsStringIsCastedToInt() public method

    public function testPortPassedAsStringIsCastedToInt()
    {
        $uri = (new Uri('//example.com'))->withPort('8080');
        $this->assertSame(8080, $uri->getPort(), 'Port is returned as integer');
        $this->assertSame('example.com:8080', $uri->getAuthority());
    }
UriTest