Conditions | 1 |
Paths | 1 |
Total Lines | 32 |
Code Lines | 22 |
Lines | 32 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | $this->createEntities(); |
||
16 | $this->doTest([], 2); |
||
17 | } |
||
18 | |||
19 | public function testRelationCriteria() |
||
20 | { |
||
21 | $parentId = $this->createEntities(); |
||
22 | $this->doTest( |
||
23 | [ |
||
24 | 'parent' => $parentId, |
||
25 | ], |
||
26 | 1 |
||
27 | ); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param $criteria |
||
32 | * |
||
33 | * @return null|\Symfony\Component\HttpFoundation\Response |
||
34 | */ |
||
35 | protected function doRequest($criteria) |
||
36 | { |
||
37 | $client = self::createClient(); |
||
38 | $client->request( |
||
39 | 'GET', |
||
40 | '/api/entity/my-entity/count', |
||
41 | [ |
||
42 | 'criteria' => $criteria, |
||
43 | ], |
||
44 | [], |
||
45 | ['HTTP_CONTENT_TYPE' => 'application/json'] |
||
46 | ); |
||
47 | |||
77 |