Skip to content
Snippets Groups Projects
Commit 89465f82 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Merge branch 'master' of https://github.com/vufind-org/vufind

parents 98c6b815 5c63c69a
Branches
Tags
No related merge requests found
...@@ -65,6 +65,28 @@ class LoaderTest extends TestCase ...@@ -65,6 +65,28 @@ class LoaderTest extends TestCase
$loader->load('test'); $loader->load('test');
} }
/**
* Test "tolerate missing records" feature.
*
* @return void
*/
public function testToleratedMissingRecord()
{
$collection = $this->getCollection(array());
$service = $this->getMock('VuFindSearch\Service');
$service->expects($this->once())->method('retrieve')
->with($this->equalTo('VuFind'), $this->equalTo('test'))
->will($this->returnValue($collection));
$missing = $this->getDriver('missing', 'Missing');
$factory = $this->getMock('VuFind\RecordDriver\PluginManager');
$factory->expects($this->once())->method('get')
->with($this->equalTo('Missing'))
->will($this->returnValue($missing));
$loader = $this->getLoader($service, $factory);
$record = $loader->load('test', 'VuFind', true);
$this->assertEquals($missing, $record);
}
/** /**
* Test single record. * Test single record.
* *
......
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