Skip to content
Snippets Groups Projects
Commit c84ccab0 authored by Demian Katz's avatar Demian Katz
Browse files

Fixed terms misconfiguration and added integration test.

Resolves VUFIND-864.
parent b4d41539
No related merge requests found
...@@ -229,7 +229,7 @@ abstract class AbstractSolrBackendFactory implements FactoryInterface ...@@ -229,7 +229,7 @@ abstract class AbstractSolrBackendFactory implements FactoryInterface
'defaults' => array('fl' => '*,score'), 'defaults' => array('fl' => '*,score'),
'appends' => array('fq' => array()), 'appends' => array('fq' => array()),
), ),
'terms' => array( 'term' => array(
'functions' => array('terms'), 'functions' => array('terms'),
), ),
); );
......
...@@ -107,4 +107,20 @@ class SolrTest extends \VuFindTest\Unit\TestCase ...@@ -107,4 +107,20 @@ class SolrTest extends \VuFindTest\Unit\TestCase
$this->assertEquals($item['count'], count($item['ids'])); $this->assertEquals($item['count'], count($item['ids']));
$this->assertEquals('123.46 .Q39', $item['heading']); $this->assertEquals('123.46 .Q39', $item['heading']);
} }
/**
* Check that the terms handler is working.
*
* @return void
*/
public function testTermsHandler()
{
$solr = $this->getServiceManager()->get('VuFind\Search\BackendManager')
->get('Solr');
$currentPageInfo = $solr->terms('id', 'test', 1)->getFieldTerms('id');
$this->assertEquals(1, count($currentPageInfo));
foreach ($currentPageInfo as $key => $value) {
$this->assertEquals('test', substr($key, 0, 4));
}
}
} }
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment