Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
17 | 1 | protected function makeIdentityClientResponse(array $responseData) |
|
18 | { |
||
19 | 1 | $mockedHttpClient = $this->getMockBuilder(\SocialConnect\Common\Http\Client\Curl::class) |
|
20 | 1 | ->disableProxyingToOriginalMethods() |
|
21 | 1 | ->getMock(); |
|
22 | |||
23 | 1 | $response = new \SocialConnect\Common\Http\Response( |
|
24 | 1 | 200, |
|
25 | 1 | json_encode( |
|
26 | $responseData |
||
27 | 1 | ), |
|
28 | 1 | [] |
|
29 | 1 | ); |
|
30 | |||
31 | 1 | $mockedHttpClient->expects($this->once()) |
|
32 | 1 | ->method('request') |
|
33 | 1 | ->willReturn($response); |
|
34 | |||
35 | 1 | return $mockedHttpClient; |
|
36 | } |
||
37 | } |
||
38 |