public function testCanSendServiceIntegratedPricing() { $mockSessionHandler = $this->getMockBuilder('Amadeus\\Client\\Session\\Handler\\HandlerInterface')->getMock(); $mockedSendResult = new Client\Session\Handler\SendResult(); $mockedSendResult->responseXml = $this->getTestFile('serviceIntegratedPricingReply151.txt'); $messageResult = new Client\Result($mockedSendResult); $expectedMessageResult = new Client\Struct\Service\IntegratedPricing(new Client\RequestOptions\ServiceIntegratedPricingOptions([])); $mockSessionHandler->expects($this->once())->method('sendMessage')->with('Service_IntegratedPricing', $expectedMessageResult, ['endSession' => false])->will($this->returnValue($mockedSendResult)); $mockSessionHandler->expects($this->never())->method('getLastResponse'); $mockSessionHandler->expects($this->once())->method('getMessagesAndVersions')->will($this->returnValue(['Service_IntegratedPricing' => "15.1"])); $par = new Params(); $par->sessionHandler = $mockSessionHandler; $par->requestCreatorParams = new Params\RequestCreatorParams(['receivedFrom' => 'some RF string', 'originatorOfficeId' => 'BRUXXXXXX']); $client = new Client($par); $response = $client->serviceIntegratedPricing(new Client\RequestOptions\ServiceIntegratedPricingOptions([])); $this->assertEquals($messageResult, $response); }