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