Merge trunk (WIP)

This commit is contained in:
dinamiko 2021-10-07 17:36:29 +02:00
commit e36d77fad2
25 changed files with 1052 additions and 195 deletions

View file

@ -8,6 +8,7 @@ use Requests_Utility_CaseInsensitiveDictionary;
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
use WooCommerce\PayPalCommerce\ApiClient\Entity\ApplicationContext;
use Woocommerce\PayPalCommerce\ApiClient\Entity\Capture;
use WooCommerce\PayPalCommerce\ApiClient\Entity\CaptureStatus;
use WooCommerce\PayPalCommerce\ApiClient\Entity\Order;
use WooCommerce\PayPalCommerce\ApiClient\Entity\OrderStatus;
use WooCommerce\PayPalCommerce\ApiClient\Entity\PatchCollection;
@ -288,7 +289,7 @@ class OrderEndpointTest extends TestCase
$expectedOrder->shouldReceive('purchase_units')->once()->andReturn(['0'=>$purchaseUnit]);
$purchaseUnit->shouldReceive('payments')->once()->andReturn($payment);
$payment->shouldReceive('captures')->once()->andReturn(['0'=>$capture]);
$capture->shouldReceive('status')->once()->andReturn('');
$capture->shouldReceive('status')->once()->andReturn(new CaptureStatus(CaptureStatus::COMPLETED));
$result = $testee->capture($orderToCapture);
$this->assertEquals($expectedOrder, $result);