You are here

function DrupalSolrMatchTestCase::getText in Apache Solr Search 6

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.2 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::getText()
  4. 7 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::_setup 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 95
Tests for the apachsolr module: index and search.

Class

DrupalSolrMatchTestCase
@file Tests for the apachsolr module: index and search.

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));
}