protected function DrupalSolrMatchTestCase::buildDocument in Apache Solr Search 8
Same name and namespace in other branches
- 6.3 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::buildDocument()
- 7 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::buildDocument()
1 call to DrupalSolrMatchTestCase::buildDocument()
- 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 221
Class
Code
protected function buildDocument($values = array()) {
$document = new ApacheSolrDocument();
if (!isset($values['entity_type'])) {
$values['entity_type'] = 'fake.';
}
$document->id = apachesolr_document_id($values['entity_id'], $values['entity_type']);
foreach ($values as $key => $value) {
$document->{$key} = $value;
}
return $document;
}