diff options
author | Michal Čihař <michal@cihar.com> | 2016-03-07 17:21:45 +0100 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2016-03-07 17:21:45 +0100 |
commit | 5987cda0ded12b258ca1fafcc71a45fbac63fe3e (patch) | |
tree | c88d92f7b53534bfe1cb9d26f3dface84ce00932 | |
parent | 07b74364c460e084c17c932d2054128daeea9422 (diff) | |
download | sql-parser-5987cda0ded12b258ca1fafcc71a45fbac63fe3e.zip sql-parser-5987cda0ded12b258ca1fafcc71a45fbac63fe3e.tar.gz sql-parser-5987cda0ded12b258ca1fafcc71a45fbac63fe3e.tar.bz2 |
Add testcase
See https://github.com/phpmyadmin/phpmyadmin/issues/12065
Signed-off-by: Michal Čihař <michal@cihar.com>
-rw-r--r-- | tests/Builder/CreateStatementTest.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Builder/CreateStatementTest.php b/tests/Builder/CreateStatementTest.php index 6e41d5d..7ef247c 100644 --- a/tests/Builder/CreateStatementTest.php +++ b/tests/Builder/CreateStatementTest.php @@ -42,6 +42,23 @@ class CreateStatementTest extends TestCase ); } + public function testBuilderDefaultInt() + { + $parser = new Parser( + "CREATE TABLE IF NOT EXISTS t1 (" . + " c1 int(11) NOT NULL DEFAULT '0' COMMENT 'xxx'" . + ") ENGINE=MyISAM" + ); + $stmt = $parser->statements[0]; + + $this->assertEquals( + "CREATE TABLE IF NOT EXISTS t1 (\n" . + " `c1` int(11) NOT NULL DEFAULT '0' COMMENT 'xxx'\n" . + ") ENGINE=MyISAM", + $stmt->build() + ); + } + public function testBuilderDefaultComment() { $parser = new Parser( |