diff options
author | Sébastien Kergreis <seb.kerro@gmail.com> | 2016-05-31 15:44:09 -0500 |
---|---|---|
committer | Sébastien Kergreis <seb.kerro@gmail.com> | 2016-06-01 13:48:22 -0500 |
commit | 6af3b6dfdbd2be9de3a3d670b89f694e4fcffd69 (patch) | |
tree | b429602abc74d217b42b2367aba7426b29bcc9e5 /tests/units | |
parent | 4987e245bb629e3171425bf16db341c5c3a7c3c7 (diff) |
Fix filters with UTF-8 characters
Diffstat (limited to 'tests/units')
-rw-r--r-- | tests/units/Core/Filter/LexerTest.php | 24 |
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('६Δↈ五一')); + } } |