summaryrefslogtreecommitdiffstats
path: root/tests/Utils/FormatterTest.php
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-02-19 14:56:43 +0100
committerMichal Čihař <michal@cihar.com>2016-02-19 14:56:43 +0100
commit757b5bd9d6d3d33e3e66681771817238878791a5 (patch)
tree85b7c2c1b9637b067c9a4ccf75d85a6ece8d7677 /tests/Utils/FormatterTest.php
parent69c5fd9edb4817b3f63e0362bb69d90d7e6a82d9 (diff)
downloadsql-parser-757b5bd9d6d3d33e3e66681771817238878791a5.zip
sql-parser-757b5bd9d6d3d33e3e66681771817238878791a5.tar.gz
sql-parser-757b5bd9d6d3d33e3e66681771817238878791a5.tar.bz2
Test formatting for INSERT
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'tests/Utils/FormatterTest.php')
-rw-r--r--tests/Utils/FormatterTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Utils/FormatterTest.php b/tests/Utils/FormatterTest.php
index 3191a46..1344257 100644
--- a/tests/Utils/FormatterTest.php
+++ b/tests/Utils/FormatterTest.php
@@ -64,6 +64,16 @@ class FormatTest extends TestCase
'html'
),
array(
+ 'INSERT INTO foo VALUES (0, 0, 0), (1, 1, 1)',
+ '<span class="sql-reserved">INSERT</span>' . "\n" .
+ '<span class="sql-reserved">INTO</span>' . "\n" .
+ ' foo' . "\n" .
+ '<span class="sql-reserved">VALUES</span>' .
+ '(<span class="sql-number">0</span>, <span class="sql-number">0</span>, <span class="sql-number">0</span>),' .
+ '(<span class="sql-number">1</span>, <span class="sql-number">1</span>, <span class="sql-number">1</span>)',
+ 'html'
+ ),
+ array(
'SELECT 1',
"\x1b[35mSELECT\n \x1b[92m1",
'cli'