| Total Complexity | 2 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class QueryTest extends AbstractQueryTest |
||
| 12 | { |
||
| 13 | protected ?string $driverName = 'sqlite'; |
||
| 14 | |||
| 15 | public function testUnion(): void |
||
| 16 | { |
||
| 17 | $db = $this->getConnection(); |
||
| 18 | |||
| 19 | $query = new Query($db); |
||
| 20 | |||
| 21 | $query->select(['id', 'name']) |
||
| 22 | ->from('item') |
||
| 23 | ->union( |
||
| 24 | (new Query($db)) |
||
| 25 | ->select(['id', 'name']) |
||
| 26 | ->from(['category']) |
||
| 27 | ); |
||
| 28 | |||
| 29 | $result = $query->all(); |
||
| 30 | |||
| 31 | $this->assertNotEmpty($result); |
||
| 32 | $this->assertCount(7, $result); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function testLimitOffsetWithExpression(): void |
||
| 49 | } |
||
| 50 | } |
||
| 51 |