You are here

function DrupalSolrMatchTestCase::_solr_build_document in Apache Solr Search 6

Same name and namespace in other branches
  1. 6.2 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::_solr_build_document()
1 call to DrupalSolrMatchTestCase::_solr_build_document()
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 74
Tests for the apachsolr module: index and search.

Class

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

Code

function _solr_build_document($nid, $values = array()) {
  $document = new Apache_Solr_Document();
  $document->id = apachesolr_document_id($nid);
  foreach ($values as $key => $value) {
    $document->{$key} = $value;
  }
  return $document;
}