function 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/search.test, line 1827

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.