Skip to content

Commit 32e10ad

Browse files
committed
Add a test case for #256
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent c2a3579 commit 32e10ad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Builder/CreateStatementTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ public function testBuilderDefaultInt(): void
7070
);
7171
}
7272

73+
public function testBuilderWithComments(): void
74+
{
75+
$parser = new Parser('CREATE TABLE tab1 (`col1` TIMESTAMP /*!40100 DEFAULT NULL */)');
76+
$stmt = $parser->statements[0];
77+
$this->assertEquals(
78+
// TODO: fix with https://github.com/phpmyadmin/sql-parser/issues/256
79+
"CREATE TABLE tab1 (\n `col1` timestamp DEFAULT NULL\n) ",
80+
$stmt->build()
81+
);
82+
}
83+
7384
public function testBuilderCompressed(): void
7485
{
7586
$parser = new Parser('CREATE TABLE users ( user_id int ) PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;');

0 commit comments

Comments
 (0)