Esempio n. 1
0
 /**
  * Standard setup method.
  *
  * @return void
  */
 public function setUp()
 {
     // Give up if we're not running in CI:
     if (!$this->continuousIntegrationRunning()) {
         return $this->markTestSkipped('Continuous integration not running.');
     }
     $this->driver = $this->getMock('VuFind\\ILS\\Driver\\Sample');
     $driverManager = new \VuFind\ILS\Driver\PluginManager();
     $driverManager->setService('Sample', $this->driver);
     $mockConfigReader = $this->getMock('VuFind\\Config\\PluginManager');
     $mockConfigReader->expects($this->any())->method('get')->will($this->returnValue(new \Zend\Config\Config([])));
     $this->auth = new \VuFind\Auth\ILS(new \VuFind\ILS\Connection(new \Zend\Config\Config(['driver' => 'Sample']), $driverManager, $mockConfigReader), $this->getMockILSAuthenticator());
     $this->auth->setDbTableManager($this->getServiceManager()->get('VuFind\\DbTablePluginManager'));
     $this->auth->getCatalog()->setDriver($this->driver);
 }