You are here

function DrupalSolrMatchTestCase::getText in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::getText()
  2. 6.3 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::getText()
  3. 6 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::getText()
  4. 6.2 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::getText()

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 DrupalSolrMatchTestCase::getText()
DrupalSolrMatchTestCase::populateIndex in tests/solr_index_and_search.test
Set up a small index of items to test against.

File

tests/solr_index_and_search.test, line 245

Class

DrupalSolrMatchTestCase

Code

function getText($n) {

  // Start over after 7.
  $n = $n % 7;
  $words = explode(' ', "Ipsum dolore sit am. Ut enim am minim veniam. Es cillum dolore eu.");
  return implode(' ', array_slice($words, $n - 1, $n));
}