public function testGetMyProfileUsingRestDLF() { $this->setUpDriver('Aleph_XServer_disabled.ini'); $patronId = 'TEST'; $user = array('id' => 'TEST'); $patronAddressUrl = self::DLF_API_BASE_URL . "/patron/{$patronId}/patronInformation/address/"; $patronAddressResponse = $this->getResponse('v20.2.10', 'patronInformationAddressResponse.xml'); $this->mockedHttpService->expects($this->at(0))->method('get')->with($this->equalTo($patronAddressUrl), $this->equalTo(array()), $this->equalTo(null))->will($this->returnValue($patronAddressResponse)); $patronRegistrationUrl = self::DLF_API_BASE_URL . "/patron/{$patronId}/patronStatus/registration/"; $patronRegistrationResponse = $this->getResponse('v20.2.10', 'patronStatusRegistration.xml'); $this->mockedHttpService->expects($this->at(1))->method('get')->with($this->equalTo($patronRegistrationUrl), $this->equalTo(array()), $this->equalTo(null))->will($this->returnValue($patronRegistrationResponse)); $expectedResult = array('lastname' => 'John Smith', 'firstname' => '', 'address1' => 'Street 123', 'address2' => '12345 Springfield', 'barcode' => 'TEST', 'zip' => '', 'phone' => '+042 123 456 789', 'email' => '*****@*****.**', 'addressValidFrom' => '08-30-2010', 'addressValidTo' => '12-31-2013', 'id' => 'TEST', 'expire' => '08-08-2014', 'group' => '04 - S'); $realResult = $this->driver->getMyProfile($user); $this->assertEquals($expectedResult, $realResult); }