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