예제 #1
0
 /**
  * Setup Aleph driver using given configuration file
  *
  * @param string $config configuration file to use
  *
  * @throws RuntimeException
  * @return void
  */
 protected function setUpDriver($config)
 {
     $file = realpath(\VUFIND_PHPUNIT_MODULE_PATH . self::FIXTURE_DIRECTORY . 'configs/' . $config);
     if (!$file) {
         throw new RuntimeException(sprintf('Unable to get configuration for driver %s', $config));
     }
     $this->driverConfig = parse_ini_file($file, true);
     $this->driver = new Aleph(new \VuFind\Date\Converter());
     $this->mockedHttpService = $this->getMock('VuFindHttp\\HttpServiceInterface');
     $this->driver->setHttpService($this->mockedHttpService);
     $this->driver->setConfig($this->driverConfig);
     $this->driver->init();
 }