| Conditions | 2 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 13 | public function testBuild( |
||
| 14 | array|ExpressionInterface|string $conditions, |
||
| 15 | string $expected, |
||
| 16 | array $expectedParams = [] |
||
| 17 | ): void { |
||
| 18 | $query = $this->mock->query()->where($conditions); |
||
| 19 | [$sql, $params] = $this->mock |
||
| 20 | ->queryBuilder($this->columnQuoteCharacter, $this->tableQuoteCharacter) |
||
| 21 | ->build($query); |
||
| 22 | |||
| 23 | $this->assertSame( |
||
| 24 | 'SELECT *' . ( |
||
| 25 | empty($expected) ? '' : ' WHERE ' . DbHelper::replaceQuotes( |
||
| 26 | $expected, |
||
| 27 | $this->mock->getDriverName(), |
||
| 28 | ) |
||
| 29 | ), |
||
| 30 | $sql, |
||
| 31 | ); |
||
| 32 | $this->assertSame($expectedParams, $params); |
||
| 33 | } |
||
| 35 |