| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class SuperExprTest extends ExprTest |
||
| 8 | { |
||
| 9 | |||
| 10 | public function testIn() |
||
| 11 | { |
||
| 12 | $expectedSql = 'col IN (?, ?, ?)'; |
||
| 13 | $expectedParams = [['col', \PDO::PARAM_STR], [8, \PDO::PARAM_STR], [6, \PDO::PARAM_INT]]; |
||
| 14 | |||
| 15 | $sql = 'col IN (??)'; |
||
| 16 | $params = [[['col', \PDO::PARAM_STR], 8, [6, \PDO::PARAM_INT]]]; |
||
| 17 | |||
| 18 | $sut = $this->createSut($sql, $params); |
||
| 19 | |||
| 20 | $actualSql = $sut->__toString(); |
||
| 21 | $actualParams = $sut->getParams(); |
||
| 22 | |||
| 23 | $this->assertSame($expectedSql, $actualSql); |
||
| 24 | $this->assertSame($expectedParams, $actualParams); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $sql |
||
| 29 | * @param array $params |
||
| 30 | * |
||
| 31 | * @return Expr |
||
| 32 | */ |
||
| 33 | protected function createSut(string $sql, array $params = []): Expr |
||
| 36 | } |
||
| 37 | } |
||
| 38 |