function SearchTokenizerTestCase::testNoTokenizer in Drupal 7
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/ search.test, line 1823  - 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.
  variable_set('minimum_word_size', 1);
  variable_set('overlap_cjk', TRUE);
  $this
    ->refreshVariables();
  $letters = 'abcdefghijklmnopqrstuvwxyz';
  $out = trim(search_simplify($letters));
  $this
    ->assertEqual($letters, $out, 'Letters are not CJK tokenized');
}