yield 'native' =>
[fopen('https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png', 'r'
)];
yield 'symfony' =>
[HttpClient::
create()->
request('GET', 'https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png'
)->
toStream()];
} /**
* @dataProvider provideResolveUrl
*/
public function testResolveUrl(string
$base, string
$url, string
$expected) { $this->
assertSame($expected,
implode('', self::
resolveUrl(self::
parseUrl($url), self::
parseUrl($base))));
} /**
* From https://github.com/guzzle/psr7/blob/master/tests/UriResoverTest.php.
*/
public static function provideResolveUrl(): array
{ return [ [self::RFC3986_BASE, 'http:h', 'http:h'
],
[self::RFC3986_BASE, 'g', 'http://a/b/c/g'
],
[self::RFC3986_BASE, './g', 'http://a/b/c/g'
],
[