Skip to content

Commit

Permalink
Fix SoapFaultTest
Browse files Browse the repository at this point in the history
  • Loading branch information
otazniksk committed Dec 6, 2024
1 parent 47799e4 commit 3b05383
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/ComfortPay/SoapFaultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 3b05383

Please sign in to comment.