Ejemplo n.º 1
0
 public function testCanSetSessionData()
 {
     $mockSessionHandler = $this->getMockBuilder('Amadeus\\Client\\Session\\Handler\\HandlerInterface')->getMock();
     $dummySessionData = ['sessionId' => 'XFHZEKLRZHREJ', 'sequenceNumber' => 12, 'securityToken' => 'RKLERJEZLKRHZEJKLRHEZJKLREZRHEZK'];
     $mockSessionHandler->expects($this->once())->method('setSessionData')->with($dummySessionData)->will($this->returnValue(true));
     $par = new Params();
     $par->sessionHandler = $mockSessionHandler;
     $par->requestCreatorParams = new Params\RequestCreatorParams(['receivedFrom' => 'some RF string', 'originatorOfficeId' => 'BRUXXXXXX']);
     $client = new Client($par);
     $result = $client->setSessionData($dummySessionData);
     $this->assertTrue($result);
 }