summaryrefslogtreecommitdiffstats
path: root/tests/Utils/FormatterTest.php
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-09-13 14:13:24 +0200
committerMichal Čihař <michal@cihar.com>2016-09-13 14:13:24 +0200
commita1e6fe1bc31f1e628c0dc62effcab554987b7933 (patch)
tree20a09e57398d3e81a5af54a8a5df6dc67da886a5 /tests/Utils/FormatterTest.php
parent95e4520792288359b3ebfab733b301be4e7c1d08 (diff)
downloadsql-parser-a1e6fe1bc31f1e628c0dc62effcab554987b7933.zip
sql-parser-a1e6fe1bc31f1e628c0dc62effcab554987b7933.tar.gz
sql-parser-a1e6fe1bc31f1e628c0dc62effcab554987b7933.tar.bz2
Test console highligting of more complex queries
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'tests/Utils/FormatterTest.php')
-rw-r--r--tests/Utils/FormatterTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/Utils/FormatterTest.php b/tests/Utils/FormatterTest.php
index a445476..6e8b1a6 100644
--- a/tests/Utils/FormatterTest.php
+++ b/tests/Utils/FormatterTest.php
@@ -79,6 +79,11 @@ class FormatTest extends TestCase
'cli'
),
array(
+ 'SELECT "Text" AS BAR',
+ "\x1b[35mSELECT\n \x1b[91m\"Text\" \x1b[35mAS \x1b[39mBAR\x1b[0m",
+ 'cli'
+ ),
+ array(
'SELECT coditm AS Item, descripcion AS Descripcion, contenedores AS Contenedores, IF(suspendido = 1, Si, NO) AS Suspendido FROM `DW_articulos` WHERE superado = 0',
'<span class="sql-reserved">SELECT</span>' . "\n" .
' coditm <span class="sql-reserved">AS</span> Item,' . "\n" .