From 05cdf9c1ae0aa747ed7826d909fee4e2f2c1d95d Mon Sep 17 00:00:00 2001
From: Pedro Silva
Date: Fri, 12 Apr 2024 16:31:47 +0100
Subject: [PATCH] Fix tests.
---
.../ppcp-api-client/src/Authentication/UserIdToken.php | 1 -
.../PHPUnit/ApiClient/Authentication/PayPalBearerTest.php | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/ppcp-api-client/src/Authentication/UserIdToken.php b/modules/ppcp-api-client/src/Authentication/UserIdToken.php
index 2c17e7787..cae8cb58a 100644
--- a/modules/ppcp-api-client/src/Authentication/UserIdToken.php
+++ b/modules/ppcp-api-client/src/Authentication/UserIdToken.php
@@ -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;
/**
diff --git a/tests/PHPUnit/ApiClient/Authentication/PayPalBearerTest.php b/tests/PHPUnit/ApiClient/Authentication/PayPalBearerTest.php
index 79e3a6f12..5a5ca6b19 100644
--- a/tests/PHPUnit/ApiClient/Authentication/PayPalBearerTest.php
+++ b/tests/PHPUnit/ApiClient/Authentication/PayPalBearerTest.php
@@ -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') {