diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php index b482071098634013bf1258cdb044f82326847283..7b3a8492b159210ca76fd892b4b5302192b4e537 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php @@ -48,7 +48,9 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase { $this->setExpectedException('VuFind\Exception\ILS'); - $test = new MultiBackend(new \VuFind\Config\PluginManager()); + $test = new MultiBackend( + new \VuFind\Config\PluginManager(), $this->getMockILSAuthenticator() + ); $test->init(); } @@ -84,7 +86,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase ->will( $this->throwException(new \Zend\Config\Exception\RuntimeException()) ); - $driver = new MultiBackend($mockPM); + $driver = new MultiBackend($mockPM, $this->getMockILSAuthenticator()); $driver->setConfig(array('Drivers' => array())); $driver->init(); $val = $this->callMethod($driver, 'getDriverConfig', array('bad')); @@ -650,12 +652,26 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase */ protected function getDriver() { - $driver = new MultiBackend($this->getPluginManager()); + $driver = new MultiBackend( + $this->getPluginManager(), $this->getMockILSAuthenticator() + ); $driver->setConfig(array('Drivers' => array())); $driver->init(); return $driver; } + /** + * Get a mock ILS authenticator + * + * @return \VuFind\Auth\ILSAuthenticator + */ + protected function getMockILSAuthenticator() + { + return $this->getMockBuilder('VuFind\Auth\ILSAuthenticator') + ->disableOriginalConstructor() + ->getMock(); + } + /** * Method to get a fresh Plugin Manager. *