summaryrefslogtreecommitdiffstats
path: root/tests/bootstrap.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bootstrap.php')
-rw-r--r--tests/bootstrap.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 6cc3c63..d23d71f 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -9,6 +9,19 @@ use SqlParser\Parser;
use SqlParser\Token;
/**
+ * Dummy function used to test if errors are translated.
+ *
+ * It translates only "TO_TRANSLATE" to "***".
+ *
+ * @param string $msg
+ *
+ * @return string
+ */
+function translate($msg) {
+ return str_replace('TO_TRANSLATE', '***' , $msg);
+}
+
+/**
* Implements useful methods for testing.
*
* Each test consists of a string that represents the serialized Lexer or Parser