Set up a small index of items to test against.

1 call to SearchMatchTestCase::_setup()
SearchMatchTestCase::testMatching in modules/search/search.test
Test search indexing.

File

modules/search/search.test, line 44
Tests for search.module.

Class

SearchMatchTestCase
Indexes content and queries it.

Code

function _setup() {
  variable_set('minimum_word_size', 3);
  for ($i = 1; $i <= 7; ++$i) {
    search_index($i, SEARCH_TYPE, $this
      ->getText($i));
  }
  for ($i = 1; $i <= 5; ++$i) {
    search_index($i + 7, SEARCH_TYPE_2, $this
      ->getText2($i));
  }

  // No getText builder function for Japanese text; just a simple array.
  foreach (array(
    13 => '以呂波耳・ほへとち。リヌルヲ。',
    14 => 'ドルーパルが大好きよ!',
    15 => 'コーヒーとケーキ',
  ) as $i => $jpn) {
    search_index($i, SEARCH_TYPE_JPN, $jpn);
  }
  search_update_totals();
}