Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testBuilder() |
||
13 | { |
||
14 | $query = 'RENAME TABLE old_table TO new_table'; |
||
15 | $parser = new Parser( |
||
16 | $query |
||
17 | ); |
||
18 | $stmt = $parser->statements[0]; |
||
19 | $this->assertEquals( |
||
20 | $query, |
||
21 | $stmt->build() |
||
22 | ); |
||
23 | |||
24 | $query = 'RENAME TABLE current_db.tbl_name TO other_db.tbl_name'; |
||
25 | $parser = new Parser( |
||
26 | $query |
||
27 | ); |
||
28 | $stmt = $parser->statements[0]; |
||
29 | $this->assertEquals( |
||
30 | $query, |
||
31 | $stmt->build() |
||
32 | ); |
||
33 | |||
34 | $query = 'RENAME TABLE old_table1 TO new_table1, old_table2 TO new_table2, old_table3 TO new_table3'; |
||
35 | $parser = new Parser( |
||
36 | $query |
||
37 | ); |
||
38 | $stmt = $parser->statements[0]; |
||
39 | $this->assertEquals( |
||
40 | $query, |
||
41 | $stmt->build() |
||
42 | ); |
||
45 |