You are here

function SearchMatchTest::_get_text in SimpleTest 6

Same name and namespace in other branches
  1. 5 tests/search_match.test \SearchMatchTest::_get_text()

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 SearchMatchTest::_get_text()
SearchMatchTest::_setup in tests/search_match.test
Set up a small index of items to test against.

File

tests/search_match.test, line 63

Class

SearchMatchTest

Code

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