Added filter class for tags

This commit is contained in:
Frederic Guillot
2016-06-24 11:40:58 -04:00
parent 700b4e8f02
commit b2e92480c2
8 changed files with 243 additions and 12 deletions

View File

@@ -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'));
}
}