summaryrefslogtreecommitdiffstats
path: root/tests/Lexer
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Lexer')
-rw-r--r--tests/Lexer/LexerTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Lexer/LexerTest.php b/tests/Lexer/LexerTest.php
index 1a7c5f5..8a7798c 100644
--- a/tests/Lexer/LexerTest.php
+++ b/tests/Lexer/LexerTest.php
@@ -31,6 +31,24 @@ class LexerTest extends TestCase
}
/**
+ * @runInSeparateProcess
+ * @preserveGlobalState disabled
+ */
+ public function testErrorTranslate()
+ {
+ define('TRANSLATE', '\\SqlParser\\Tests\\translate');
+
+ $lexer = new Lexer('');
+
+ $lexer->error('TO_TRANSLATE', null);
+
+ $this->assertEquals(
+ $lexer->errors,
+ array(new LexerException('***', null, 0))
+ );
+ }
+
+ /**
* @expectedException SqlParser\Exceptions\LexerException
* @expectedExceptionMessage strict error
* @expectedExceptionCode 4