Exemplo n.º 1
0
 /**
  * Test setter.
  *
  * @return void
  */
 public function testSetMaxQueryTime()
 {
     $back = new Backend($this->getConnectorMock());
     $back->setMaxQueryTime(3);
     $this->assertEquals(3, $this->getProperty($back, 'maxQueryTime'));
 }
Exemplo n.º 2
0
 /**
  * Create the Pazpar2 backend.
  *
  * @param Connector $connector Connector
  *
  * @return Backend
  */
 protected function createBackend(Connector $connector)
 {
     $backend = new Backend($connector, $this->createRecordCollectionFactory());
     $backend->setLogger($this->logger);
     $backend->setQueryBuilder($this->createQueryBuilder());
     if (isset($this->config->General->max_query_time)) {
         $backend->setMaxQueryTime($this->config->General->max_query_time);
     }
     if (isset($this->config->General->progress_target)) {
         $backend->setSearchProgressTarget($this->config->General->progress_target);
     }
     return $backend;
 }