/** * @test */ public function transposeKeepsChangedParameters() { $parsedUri = new ParsedUri('http://example.com/?foo=bar&baz=303'); $parsedUri->queryString()->addParam('baz', '313'); $parsedUri->queryString()->addParam('dummy', 'example'); assert($parsedUri->transpose(['scheme' => 'https'])->asStringWithoutPort(), equals('https://example.com/?foo=bar&baz=313&dummy=example')); }
/** * @test * @since 4.0.0 */ public function portEqualsOnlyOriginalPort() { $parsedUri = new ParsedUri('foo://example.org:77/?wsdl#top'); assertTrue($parsedUri->portEquals(77)); assertFalse($parsedUri->portEquals(80)); }