You are here

function SearchMatchTestCase::getText in Drupal 7

_test_: Helper method for generating snippets of content.

Generated items to test against: 1 ipsum 2 dolore sit 3 sit am ut 4 am ut enim am 5 ut enim am minim veniam 6 enim am minim veniam es cillum 7 am minim veniam es cillum dolore eu

1 call to SearchMatchTestCase::getText()
SearchMatchTestCase::_setup in modules/search/search.test
Set up a small index of items to test against.

File

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

Class

SearchMatchTestCase
Indexes content and queries it.

Code

function getText($n) {
  $words = explode(' ', "Ipsum dolore sit am. Ut enim am minim veniam. Es cillum dolore eu.");
  return implode(' ', array_slice($words, $n - 1, $n));
}