| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class TruncateTest extends TestCase |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @suppress PhanNoopCast |
||
| 13 | */ |
||
| 14 | public function testToStringThrowsAnExceptionIfNotInitialized() |
||
| 15 | { |
||
| 16 | $this->expectException(\RuntimeException::class); |
||
| 17 | |||
| 18 | (string)$this->getSut(); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function testToStringSimple() |
||
| 22 | { |
||
| 23 | $sql = (string)$this->getSut('foo', 'bar'); |
||
| 24 | |||
| 25 | $parts = []; |
||
| 26 | $parts[] = 'TRUNCATE foo, bar'; |
||
| 27 | |||
| 28 | $expectedSql = implode(PHP_EOL, $parts); |
||
| 29 | |||
| 30 | $this->assertSame($expectedSql, $sql); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testGetParams() |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string ...$tables |
||
| 44 | * |
||
| 45 | * @return ITruncate |
||
| 46 | */ |
||
| 47 | protected function getSut(string ...$tables): ITruncate |
||
| 52 |