public function testCanFarePricePnrWithBookingClassVersion14() { $mockSessionHandler = $this->getMockBuilder('Amadeus\\Client\\Session\\Handler\\HandlerInterface')->getMock(); $mockedSendResult = new Client\Session\Handler\SendResult(); $mockedSendResult->responseXml = $this->getTestFile('farePricePnrWithBookingClassReply14.txt'); $messageResult = new Client\Result($mockedSendResult); $expectedMessageResult = new Client\Struct\Fare\PricePNRWithBookingClass13(new Client\RequestOptions\FarePricePnrWithBookingClassOptions(['validatingCarrier' => 'SN'])); $mockSessionHandler->expects($this->once())->method('sendMessage')->with('Fare_PricePNRWithBookingClass', $expectedMessageResult, ['endSession' => false])->will($this->returnValue($mockedSendResult)); $mockSessionHandler->expects($this->never())->method('getLastResponse'); $mockSessionHandler->expects($this->once())->method('getMessagesAndVersions')->will($this->returnValue(['Fare_PricePNRWithBookingClass' => "14.3"])); $par = new Params(); $par->sessionHandler = $mockSessionHandler; $par->requestCreatorParams = new Params\RequestCreatorParams(['receivedFrom' => 'some RF string', 'originatorOfficeId' => 'BRUXXXXXX']); $client = new Client($par); $response = $client->farePricePnrWithBookingClass(new Client\RequestOptions\FarePricePnrWithBookingClassOptions(['validatingCarrier' => 'SN'])); $this->assertEquals($messageResult, $response); }