From 3b053838b482a6d012910e5989de7e147a61e657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0kop?= Date: Fri, 6 Dec 2024 12:51:00 +0100 Subject: [PATCH] Fix SoapFaultTest --- tests/ComfortPay/SoapFaultTest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/ComfortPay/SoapFaultTest.php b/tests/ComfortPay/SoapFaultTest.php index 83b29de..10c6d6c 100644 --- a/tests/ComfortPay/SoapFaultTest.php +++ b/tests/ComfortPay/SoapFaultTest.php @@ -22,13 +22,23 @@ public function testSoapFault($data, $expected) $chargeRequest = $this->getMockBuilder(ChargeRequest::class) ->disableOriginalConstructor() - ->setMethods(['getSoapClient', 'getTestMode']) + ->onlyMethods(['getSoapClient', 'getTestMode']) ->getMock(); $chargeRequest->method('getSoapClient')->willReturn($soapClientMock); $chargeRequest->method('getTestMode')->willReturn(false); - $result = $chargeRequest->sendData(['transactionId' => '123456789']); + $result = $chargeRequest->sendData([ + 'transactionId' => '123456789', + 'referedCardId' => 'refered-card-123', + 'merchantId' => 'merchant-123', + 'terminalId' => 'terminal-123', + 'amount' => 1, + 'parentTransactionId' => 1, + 'cc' => '4405 77XX XXXX XXXX', + 'e2eReference' => '', + 'transactionType' => 'PURCHASE', + ]); $this->assertInstanceOf(CardTransactionResponse::class, $result); $this->assertSame('123456789', $result->getTransactionId());