summaryrefslogtreecommitdiffstats
path: root/tests/Utils/FormatterTest.php
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-09-13 14:26:39 +0200
committerMichal Čihař <michal@cihar.com>2016-09-13 14:26:39 +0200
commit79bf8de05cbeca35e8400c630338dda6e82eefb3 (patch)
tree903db3e5d7b501088af69e0c4ff6b0c54976a890 /tests/Utils/FormatterTest.php
parent3ac7614841b2dc6b8b41a9f1491f674c4616d2af (diff)
downloadsql-parser-79bf8de05cbeca35e8400c630338dda6e82eefb3.zip
sql-parser-79bf8de05cbeca35e8400c630338dda6e82eefb3.tar.gz
sql-parser-79bf8de05cbeca35e8400c630338dda6e82eefb3.tar.bz2
Add test for comments removal
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'tests/Utils/FormatterTest.php')
-rw-r--r--tests/Utils/FormatterTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Utils/FormatterTest.php b/tests/Utils/FormatterTest.php
index 2550809..93cca7e 100644
--- a/tests/Utils/FormatterTest.php
+++ b/tests/Utils/FormatterTest.php
@@ -103,6 +103,12 @@ class FormatTest extends TestCase
'</span>',
array('type' => 'html'),
),
+ array(
+ 'SELECT 1 -- comment',
+ '<span class="sql-reserved">SELECT</span>' . "\n" .
+ ' <span class="sql-number">1</span>',
+ array('type' => 'html', 'remove_comments' => true),
+ ),
);
}
}