예제 #1
0
 public function testGetHoldingInfoForItem()
 {
     $this->setUpDriver('Aleph_XServer_enabled.ini');
     $response = $this->getResponse('v20.2.10', 'itemsPerPatronResponse.xml');
     $patronId = 'TEST';
     $lib = $this->driverConfig['Catalog']['bib'];
     $recordId = '000748028';
     $libAndRecordId = $lib . $recordId;
     $itemId = 'LIB50000748028000010';
     $expectedUrl = self::DLF_API_BASE_URL . "/patron/{$patronId}/record/{$libAndRecordId}/items/{$itemId}/";
     $this->mockedHttpService->expects($this->any())->method('get')->with($this->equalTo($expectedUrl), $this->equalTo(array()), $this->equalTo(null))->will($this->returnValue($response));
     $expectedResult = array('pickup-locations' => array('MZK' => 'Loan Department - Ground floor'), 'last-interest-date' => '29.11.2013', 'order' => 1);
     $real = $this->driver->getHoldingInfoForItem($patronId, $recordId, $itemId);
     $this->assertEquals($expectedResult, $real);
 }