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

Improved test coverage.

parent f22ec63d
No related merge requests found
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
namespace VuFindTest\Backend\Solr; namespace VuFindTest\Backend\Solr;
use VuFindSearch\Backend\Exception\RemoteErrorException;
use VuFindSearch\Backend\Solr\Backend; use VuFindSearch\Backend\Solr\Backend;
use VuFindSearch\Backend\Solr\HandlerMap; use VuFindSearch\Backend\Solr\HandlerMap;
use VuFindSearch\ParamBag; use VuFindSearch\ParamBag;
...@@ -215,6 +216,24 @@ class BackendTest extends PHPUnit_Framework_TestCase ...@@ -215,6 +216,24 @@ class BackendTest extends PHPUnit_Framework_TestCase
$this->assertEquals('foo', $back->getIdentifier()); $this->assertEquals('foo', $back->getIdentifier());
} }
/**
* Test refining an alphabrowse exception.
*
* @return void
* @expectedException VuFindSearch\Backend\Exception\RemoteErrorException
* @expectedExceptionMessage Alphabetic Browse index missing.
*/
public function testRefineAlphaBrowseException()
{
$conn = $this->getConnectorMock(array('query'));
$e = new RemoteErrorException('does not exist', 400, new \Zend\Http\Response());
$conn->expects($this->once())->method('query')
->with($this->equalTo('browse'))
->will($this->throwException($e));
$back = new Backend($conn);
$back->alphabeticBrowse('foo', 'bar', 1);
}
/// Internal API /// Internal API
/** /**
......
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