1.20.x search.test | SearchTokenizerTestCase::testNoTokenizer() |
Verifies that strings of non-CJK characters are not tokenized.
This is just a sanity check - it verifies that strings of letters are not tokenized.
File
- modules/
search/ tests/ search.test, line 1781 - Tests for search.module.
Class
- SearchTokenizerTestCase
- Test the CJK tokenizer.
Code
function testNoTokenizer() {
// Set the minimum word size to 1 (to split all CJK characters) and make
// sure CJK tokenizing is turned on.
config('search.settings')
->set('search_minimum_word_size', 1)
->set('search_overlap_cjk', TRUE)
->save();
$this->refreshVariables();
$letters = 'abcdefghijklmnopqrstuvwxyz';
$out = trim(search_simplify($letters));
$this->assertEqual($letters, $out, 'Letters are not CJK tokenized');
}