summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSébastien Kergreis <seb.kerro@gmail.com>2016-05-31 15:44:09 -0500
committerSébastien Kergreis <seb.kerro@gmail.com>2016-06-01 13:48:22 -0500
commit6af3b6dfdbd2be9de3a3d670b89f694e4fcffd69 (patch)
treeb429602abc74d217b42b2367aba7426b29bcc9e5 /tests
parent4987e245bb629e3171425bf16db341c5c3a7c3c7 (diff)
Fix filters with UTF-8 characters
Diffstat (limited to 'tests')
-rw-r--r--tests/units/Core/Filter/LexerTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/units/Core/Filter/LexerTest.php b/tests/units/Core/Filter/LexerTest.php
index d405e9df..c72231c4 100644
--- a/tests/units/Core/Filter/LexerTest.php
+++ b/tests/units/Core/Filter/LexerTest.php
@@ -178,4 +178,28 @@ class LexerTest extends Base
$this->assertSame($expected, $lexer->tokenize('date:<=2016-01-01 something else'));
}
+
+ public function testTokenizeWithUtf8Letters()
+ {
+ $lexer = new Lexer();
+ $lexer->setDefaultToken('myDefaultToken');
+
+ $expected = array(
+ 'myDefaultToken' => array('àa éçùe'),
+ );
+
+ $this->assertSame($expected, $lexer->tokenize('àa éçùe'));
+ }
+
+ public function testTokenizeWithUtf8Numbers()
+ {
+ $lexer = new Lexer();
+ $lexer->setDefaultToken('myDefaultToken');
+
+ $expected = array(
+ 'myDefaultToken' => array('६Δↈ五一'),
+ );
+
+ $this->assertSame($expected, $lexer->tokenize('६Δↈ五一'));
+ }
}