Fix tests.

This commit is contained in:
Pedro Silva 2024-04-12 16:31:47 +01:00
parent 526364a8ad
commit 05cdf9c1ae
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 4 additions and 5 deletions

View file

@ -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;
/**

View file

@ -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') {