mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix tests.
This commit is contained in:
parent
526364a8ad
commit
05cdf9c1ae
2 changed files with 4 additions and 5 deletions
|
@ -11,7 +11,6 @@ use Psr\Log\LoggerInterface;
|
|||
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\RequestTrait;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
||||
use WooCommerce\PayPalCommerce\PPCP;
|
||||
use WP_Error;
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,7 +44,7 @@ class PayPalBearerTest extends TestCase
|
|||
expect('wp_remote_get')
|
||||
->andReturnUsing(
|
||||
function ($url, $args) use ($json, $key, $secret, $host, $headers) {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials&intent=sdk_init') {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials') {
|
||||
return false;
|
||||
}
|
||||
if ($args['method'] !== 'POST') {
|
||||
|
@ -99,7 +99,7 @@ class PayPalBearerTest extends TestCase
|
|||
expect('wp_remote_get')
|
||||
->andReturnUsing(
|
||||
function ($url, $args) use ($json, $key, $secret, $host, $headers) {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials&intent=sdk_init') {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials') {
|
||||
return false;
|
||||
}
|
||||
if ($args['method'] !== 'POST') {
|
||||
|
@ -175,7 +175,7 @@ class PayPalBearerTest extends TestCase
|
|||
expect('wp_remote_get')
|
||||
->andReturnUsing(
|
||||
function ($url, $args) use ($json, $key, $secret, $host, $headers) {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials&intent=sdk_init') {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials') {
|
||||
return false;
|
||||
}
|
||||
if ($args['method'] !== 'POST') {
|
||||
|
@ -225,7 +225,7 @@ class PayPalBearerTest extends TestCase
|
|||
expect('wp_remote_get')
|
||||
->andReturnUsing(
|
||||
function ($url, $args) use ($json, $key, $secret, $host, $headers) {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials&intent=sdk_init') {
|
||||
if ($url !== $host . '/v1/oauth2/token?grant_type=client_credentials') {
|
||||
return false;
|
||||
}
|
||||
if ($args['method'] !== 'POST') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue