Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public function testAvatar() |
||
11 | { |
||
12 | $value = __DIR__ . '/data/740715586f5fecd032030346acf139c5.png'; |
||
13 | |||
14 | $mock = $this->createMock(Avatars::class); |
||
15 | $mock->expects($this->once()) |
||
16 | ->method('find') |
||
17 | ->willReturnCallback(function($id) use ($value) { |
||
|
|||
18 | return $value; |
||
19 | }); |
||
20 | |||
21 | $client = $this->createPartialMock(SleeperClient::class, ['__call']); |
||
22 | $client->expects($this->once()) |
||
23 | ->method('__call') |
||
24 | ->willReturnCallback(function($name, $args) use ($mock) { |
||
25 | return $mock; |
||
26 | }); |
||
27 | |||
28 | $response = $client->avatars()->find('gg'); |
||
29 | |||
30 | $this->assertEquals('image/png', mime_content_type($response)); |
||
31 | } |
||
34 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.