Ejemplo n.º 1
0
 /**
  * Create the WorldCat 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());
     return $backend;
 }
Ejemplo n.º 2
0
 /**
  * Test setting a custom record collection factory.
  *
  * @return void
  */
 public function testConstructorSetters()
 {
     $fact = $this->getMock('VuFindSearch\\Response\\RecordCollectionFactoryInterface');
     $conn = $this->getConnectorMock();
     $back = new Backend($conn, $fact);
     $this->assertEquals($fact, $back->getRecordCollectionFactory());
     $this->assertEquals($conn, $back->getConnector());
 }