mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
Return status instead of bool + last_status
This commit is contained in:
parent
c6229c9944
commit
07928c9935
5 changed files with 21 additions and 58 deletions
|
@ -227,10 +227,7 @@ class WcGatewayTest extends TestCase
|
|||
$authorizedPaymentsProcessor
|
||||
->expects('process')
|
||||
->with($wcOrder)
|
||||
->andReturnTrue();
|
||||
$authorizedPaymentsProcessor
|
||||
->expects('last_status')
|
||||
->andReturn(AuthorizedPaymentsProcessor::SUCCESSFUL);
|
||||
->andReturn(AuthorizedPaymentsProcessor::SUCCESSFUL);
|
||||
$authorizedOrderActionNotice = Mockery::mock(AuthorizeOrderActionNotice::class);
|
||||
$authorizedOrderActionNotice
|
||||
->expects('display_message')
|
||||
|
@ -286,10 +283,7 @@ class WcGatewayTest extends TestCase
|
|||
$authorizedPaymentsProcessor
|
||||
->expects('process')
|
||||
->with($wcOrder)
|
||||
->andReturnFalse();
|
||||
$authorizedPaymentsProcessor
|
||||
->shouldReceive('last_status')
|
||||
->andReturn(AuthorizedPaymentsProcessor::ALREADY_CAPTURED);
|
||||
->andReturn(AuthorizedPaymentsProcessor::ALREADY_CAPTURED);
|
||||
$authorizedOrderActionNotice = Mockery::mock(AuthorizeOrderActionNotice::class);
|
||||
$authorizedOrderActionNotice
|
||||
->expects('display_message')
|
||||
|
@ -338,10 +332,7 @@ class WcGatewayTest extends TestCase
|
|||
$authorizedPaymentsProcessor
|
||||
->expects('process')
|
||||
->with($wcOrder)
|
||||
->andReturnFalse();
|
||||
$authorizedPaymentsProcessor
|
||||
->shouldReceive('last_status')
|
||||
->andReturn($lastStatus);
|
||||
->andReturn($lastStatus);
|
||||
$authorizedOrderActionNotice = Mockery::mock(AuthorizeOrderActionNotice::class);
|
||||
$authorizedOrderActionNotice
|
||||
->expects('display_message')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue