Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 18 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
11 | 1 | public function testCustomRepository() |
|
12 | { |
||
13 | /** @var CustomTestRepository $repository */ |
||
14 | 1 | $repository = $this->getManager()->getRepository(CustomEntity::class); |
|
15 | 1 | $this->getResponseMock()->append( |
|
16 | 1 | new Response( |
|
17 | 1 | 200, |
|
18 | 1 | [], |
|
19 | 1 | json_encode( |
|
20 | [ |
||
21 | 1 | 'jsonrpc' => '2.0', |
|
22 | 1 | 'id' => 'test', |
|
23 | 'result' => [ |
||
24 | 1 | 'customField' => 'custom-response', |
|
25 | 1 | ], |
|
26 | ] |
||
27 | 1 | ) |
|
28 | 1 | ) |
|
29 | 1 | ); |
|
30 | |||
31 | /** @var \StdClass $data */ |
||
32 | 1 | $data = $repository->doCustomStuff(); |
|
33 | |||
34 | 1 | self::assertInstanceOf(\stdClass::class, $data); |
|
35 | 1 | self::assertEquals('custom-response', $data->customField); |
|
36 | 1 | } |
|
37 | } |
||
38 |