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

Fixed bad indentation.

parent caf31dd2
No related merge requests found
......@@ -56,57 +56,57 @@ class SolrTest extends \VuFindTest\Unit\TestCase
*
* @return void
*/
public function testAlphaBrowseSeeAlso()
{
$solr = $this->getServiceManager()->get('VuFind\Search\BackendManager')
public function testAlphaBrowseSeeAlso()
{
$solr = $this->getServiceManager()->get('VuFind\Search\BackendManager')
->get('Solr');
$result = $solr->alphabeticBrowse('author', 'Dublin Society', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals($item['count'], count($item['ids']));
$this->assertTrue(empty($item['useInstead']));
$this->assertTrue(in_array('vtls000013187', $item['ids']));
$this->assertTrue(in_array('Royal Dublin Society', $item['seeAlso']));
$this->assertEquals('Dublin Society', $item['heading']);
}
$result = $solr->alphabeticBrowse('author', 'Dublin Society', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals($item['count'], count($item['ids']));
$this->assertTrue(empty($item['useInstead']));
$this->assertTrue(in_array('vtls000013187', $item['ids']));
$this->assertTrue(in_array('Royal Dublin Society', $item['seeAlso']));
$this->assertEquals('Dublin Society', $item['heading']);
}
/**
* Check AlphaBrowse "use instead" functionality.
*
* @return void
*/
public function testAlphaBrowseUseInstead()
{
$solr = $this->getServiceManager()->get('VuFind\Search\BackendManager')
->get('Solr');
$result = $solr->alphabeticBrowse('author', 'Dublin Society, Royal', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals(0, $item['count']);
$this->assertEquals($item['count'], count($item['ids']));
$this->assertEquals('Dublin Society, Royal', $item['heading']);
$this->assertTrue(empty($item['seeAlso']));
$this->assertTrue(in_array('Royal Dublin Society', $item['useInstead']));
}
public function testAlphaBrowseUseInstead()
{
$solr = $this->getServiceManager()->get('VuFind\Search\BackendManager')
->get('Solr');
$result = $solr->alphabeticBrowse('author', 'Dublin Society, Royal', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals(0, $item['count']);
$this->assertEquals($item['count'], count($item['ids']));
$this->assertEquals('Dublin Society, Royal', $item['heading']);
$this->assertTrue(empty($item['seeAlso']));
$this->assertTrue(in_array('Royal Dublin Society', $item['useInstead']));
}
/**
* Check that expected Dewey values are present (tests VUFIND-701).
*
* @return void
*/
public function testDeweyValues()
{
$solr = $this->getServiceManager()->get('VuFind\Search\BackendManager')
public function testDeweyValues()
{
$solr = $this->getServiceManager()->get('VuFind\Search\BackendManager')
->get('Solr');
$result = $solr->alphabeticBrowse('dewey', '123.45 .I39', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals(1, $item['count']);
$this->assertEquals($item['count'], count($item['ids']));
$this->assertEquals('123.45 .I39', $item['heading']);
$result = $solr->alphabeticBrowse('dewey', '123.46 .Q39', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals(1, $item['count']);
$this->assertEquals($item['count'], count($item['ids']));
$this->assertEquals('123.46 .Q39', $item['heading']);
}
$result = $solr->alphabeticBrowse('dewey', '123.45 .I39', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals(1, $item['count']);
$this->assertEquals($item['count'], count($item['ids']));
$this->assertEquals('123.45 .I39', $item['heading']);
$result = $solr->alphabeticBrowse('dewey', '123.46 .Q39', 0, 1);
$item = $result['Browse']['items'][0];
$this->assertEquals(1, $item['count']);
$this->assertEquals($item['count'], count($item['ids']));
$this->assertEquals('123.46 .Q39', $item['heading']);
}
/**
* Check that the terms handler is working.
......
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