Merge branch 'trunk' into release/1.6.0

This commit is contained in:
dinamiko 2021-09-23 16:32:34 +02:00
commit 97e3f217e8
9 changed files with 108 additions and 30 deletions

View file

@ -8,6 +8,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit;
use WooCommerce\PayPalCommerce\ApiClient\Repository\CartRepository;
use WooCommerce\PayPalCommerce\TestCase;
use Mockery;
use WooCommerce\WooCommerce\Logging\Logger\NullLogger;
use function Brain\Monkey\Functions\expect;
class ChangeCartEndpointTest extends TestCase
@ -68,7 +69,8 @@ class ChangeCartEndpointTest extends TestCase
$shipping,
$requestData,
$cartRepository,
$dataStore
$dataStore,
new NullLogger()
);
expect('wp_send_json_success')
@ -171,4 +173,4 @@ class ChangeCartEndpointTest extends TestCase
return $testData;
}
}
}

View file

@ -16,6 +16,7 @@ use WooCommerce\PayPalCommerce\Session\SessionHandler;
use WooCommerce\PayPalCommerce\TestCase;
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
use WooCommerce\WooCommerce\Logging\Logger\NullLogger;
use function Brain\Monkey\Functions\expect;
class CreateOrderEndpointTest extends TestCase
@ -160,7 +161,8 @@ class CreateOrderEndpointTest extends TestCase
$payer_factory,
$session_handler,
$settings,
$early_order_handler
$early_order_handler,
new NullLogger()
);
return array($payer_factory, $testee);
}

View file

@ -8,6 +8,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Entity\Token;
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
use WooCommerce\PayPalCommerce\TestCase;
use Mockery;
use WooCommerce\WooCommerce\Logging\Logger\NullLogger;
use function Brain\Monkey\Functions\when;
use function Brain\Monkey\Functions\expect;
@ -22,7 +23,7 @@ class DataClientIdEndpointTest extends TestCase
parent::setUp();
$this->requestData = Mockery::mock(RequestData::class);
$this->identityToken = Mockery::mock(IdentityToken::class);
$this->sut = new DataClientIdEndpoint($this->requestData, $this->identityToken);
$this->sut = new DataClientIdEndpoint($this->requestData, $this->identityToken, new NullLogger());
}
public function testHandleRequestSuccess()