function SearchMatchTest::_get_text in SimpleTest 5
Same name and namespace in other branches
- 6 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
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));
}