diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-06-24 11:40:58 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-06-24 11:40:58 -0400 |
commit | b2e92480c29acb15586bc8ea305c8416927a667c (patch) | |
tree | 3a81aaac07b88a4af08795203e997b04d50a96c6 /tests/units/Core | |
parent | 700b4e8f0265e4eabd7a7c0eb6a06088d50554fe (diff) |
Added filter class for tags
Diffstat (limited to 'tests/units/Core')
-rw-r--r-- | tests/units/Core/Filter/LexerTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/units/Core/Filter/LexerTest.php b/tests/units/Core/Filter/LexerTest.php index c72231c4..b777531d 100644 --- a/tests/units/Core/Filter/LexerTest.php +++ b/tests/units/Core/Filter/LexerTest.php @@ -202,4 +202,16 @@ class LexerTest extends Base $this->assertSame($expected, $lexer->tokenize('६Δↈ五一')); } + + public function testTokenizeWithMultipleValues() + { + $lexer = new Lexer(); + $lexer->addToken("/^(tag:)/", 'T_TAG'); + + $expected = array( + 'T_TAG' => array('tag 1', 'tag2'), + ); + + $this->assertSame($expected, $lexer->tokenize('tag:"tag 1" tag:tag2')); + } } |