Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public function testEntityCounting() |
||
11 | { |
||
12 | $this->getClient()->push( |
||
13 | $this->getResponseMock(true, 5), |
||
14 | function (RpcRequestInterface $request) { |
||
15 | self::assertEquals('prefixed-entity/count', $request->getMethod()); |
||
16 | self::assertEquals( |
||
17 | [ |
||
18 | 'criteria' => ['prefix_payload' => 'test'], |
||
19 | ], |
||
20 | $request->getParameters() |
||
21 | ); |
||
22 | |||
23 | return true; |
||
24 | } |
||
25 | ); |
||
26 | |||
27 | $count = $this->getManager()->getUnitOfWork()->getEntityPersister(PrefixedEntity::class)->count( |
||
28 | ['payload' => 'test'] |
||
29 | ); |
||
30 | |||
31 | self::assertEquals(5, $count); |
||
32 | } |
||
33 | } |
||
34 |