Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function testGetAccessibleSubQuery(?string $login, array $expected): void |
||
21 | { |
||
22 | $user = _em()->getRepository(User::class)->getByLogin($login); |
||
23 | $subQuery = $this->repository->getAccessibleSubQuery($user); |
||
24 | if ($subQuery === '-1') { |
||
25 | $ids = []; |
||
26 | } else { |
||
27 | $ids = _em()->getConnection()->executeQuery($subQuery)->fetchAll(\PDO::FETCH_COLUMN); |
||
28 | } |
||
29 | |||
30 | sort($ids); |
||
31 | |||
32 | self::assertEquals($expected, $ids); |
||
33 | } |
||
35 |