| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function testCustomRepository() |
||
| 12 | { |
||
| 13 | /** @var CustomTestRepository $repository */ |
||
| 14 | $repository = $this->getManager()->getRepository(CustomEntity::class); |
||
| 15 | $this->getClient()->push( |
||
| 16 | $this->getResponseMock(true, (object)['customField' => 'custom-response']), |
||
| 17 | function (RpcRequestInterface $request) { |
||
| 18 | self::assertEquals('custom-entity/custom', $request->getMethod()); |
||
| 19 | self::assertEquals( |
||
| 20 | ['param1' => 'value1'], |
||
| 21 | $request->getParameters() |
||
| 22 | ); |
||
| 23 | |||
| 24 | return true; |
||
| 25 | } |
||
| 26 | ); |
||
| 27 | |||
| 28 | /** @var \StdClass $data */ |
||
| 29 | $data = $repository->doCustomStuff(); |
||
| 30 | |||
| 31 | self::assertInstanceOf(\stdClass::class, $data); |
||
| 32 | self::assertEquals('custom-response', $data->customField); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |