We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9dde640 commit 7b23d24Copy full SHA for 7b23d24
tests/TablePropsTest.php
@@ -47,4 +47,26 @@ function testTwoWordProps(){
47
48
49
# TODO: case conversion, multiple options, optional commas
50
+
51
52
+ function get_first_table($str){
53
+ $obj = new iamcal\SQLParser();
54
+ $obj->parse($str);
55
56
+ $tables = array_keys($obj->tables);
57
+ $first_key = $tables[0];
58
59
+ return $obj->tables[$first_key];
60
+ }
61
62
+ function testGeneralCreation(){
63
64
+ $tbl = $this->get_first_table("CREATE TABLE foo");
65
+ $this->assertEquals($tbl['name'], "foo");
66
+ $this->assertEquals(array_key_exists('temporary', $tbl['props']), false);
67
68
+ $tbl = $this->get_first_table("CREATE TEMPORARY TABLE foo");
69
70
+ $this->assertEquals($tbl['props']['temporary'], true);
71
72
}
0 commit comments