function SearchMatchTestCase::getText
_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
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));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.