@@ -24,7 +24,7 @@ class HttpClientTraitTest extends TestCase
24
24
/**
25
25
* @dataProvider providePrepareRequestUrl
26
26
*/
27
- public function testPrepareRequestUrl ($ expected , $ url , $ query = [])
27
+ public function testPrepareRequestUrl (string $ expected , string $ url , array $ query = [])
28
28
{
29
29
$ defaults = [
30
30
'base_uri ' => 'http://example.com?c=c ' ,
@@ -36,7 +36,7 @@ public function testPrepareRequestUrl($expected, $url, $query = [])
36
36
$ this ->assertSame ($ expected , implode ('' , $ url ));
37
37
}
38
38
39
- public function providePrepareRequestUrl ()
39
+ public function providePrepareRequestUrl (): iterable
40
40
{
41
41
yield ['http://example.com/ ' , 'http://example.com/ ' ];
42
42
yield ['http://example.com/?a=1&b=b ' , '. ' ];
@@ -48,15 +48,15 @@ public function providePrepareRequestUrl()
48
48
/**
49
49
* @dataProvider provideResolveUrl
50
50
*/
51
- public function testResolveUrl ($ base , $ url , $ expected )
51
+ public function testResolveUrl (string $ base , string $ url , string $ expected )
52
52
{
53
53
$ this ->assertSame ($ expected , implode ('' , self ::resolveUrl (self ::parseUrl ($ url ), self ::parseUrl ($ base ))));
54
54
}
55
55
56
56
/**
57
57
* From https://github.com/guzzle/psr7/blob/master/tests/UriResoverTest.php.
58
58
*/
59
- public function provideResolveUrl ()
59
+ public function provideResolveUrl (): array
60
60
{
61
61
return [
62
62
[self ::RFC3986_BASE , 'http:h ' , 'http:h ' ],
@@ -123,14 +123,14 @@ public function provideResolveUrl()
123
123
/**
124
124
* @dataProvider provideParseUrl
125
125
*/
126
- public function testParseUrl ($ expected , $ url , $ query = [])
126
+ public function testParseUrl (array $ expected , string $ url , array $ query = [])
127
127
{
128
128
$ expected = array_combine (['scheme ' , 'authority ' , 'path ' , 'query ' , 'fragment ' ], $ expected );
129
129
130
130
$ this ->assertSame ($ expected , self ::parseUrl ($ url , $ query ));
131
131
}
132
132
133
- public function provideParseUrl ()
133
+ public function provideParseUrl (): iterable
134
134
{
135
135
yield [['http: ' , '//example.com ' , null , null , null ], 'http://Example.coM:80 ' ];
136
136
yield [['https: ' , '//xn--dj-kia8a.example.com:8000 ' , '/ ' , null , null ], 'https://DÉjà.Example.com:8000/ ' ];
0 commit comments