From 3722bb6dd1b0e759ae15454b0d11215d99f78ff1 Mon Sep 17 00:00:00 2001 From: Raza Mehdi Date: Wed, 19 Jun 2024 11:35:41 +0500 Subject: [PATCH] Fix tests. Signed-off-by: Raza Mehdi --- tests/Feature/AdapterBillingPlansPricingHelpersTest.php | 4 ++-- tests/Mocks/Responses/BillingPlans.php | 2 +- tests/Mocks/Responses/CatalogProducts.php | 2 +- tests/Mocks/Responses/PartnerReferrals.php | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Feature/AdapterBillingPlansPricingHelpersTest.php b/tests/Feature/AdapterBillingPlansPricingHelpersTest.php index e0a91a5b..c1e4f8ec 100644 --- a/tests/Feature/AdapterBillingPlansPricingHelpersTest.php +++ b/tests/Feature/AdapterBillingPlansPricingHelpersTest.php @@ -13,10 +13,10 @@ class AdapterBillingPlansPricingHelpersTest extends TestCase use MockResponsePayloads; /** @var string */ - protected static string $access_token = ''; + protected static $access_token = ''; /** @var PayPalClient */ - protected PayPalClient $client; + protected $client; protected function setUp(): void { diff --git a/tests/Mocks/Responses/BillingPlans.php b/tests/Mocks/Responses/BillingPlans.php index 0544f922..f25889aa 100644 --- a/tests/Mocks/Responses/BillingPlans.php +++ b/tests/Mocks/Responses/BillingPlans.php @@ -280,7 +280,7 @@ private function mockGetPlansResponse(): array */ private function mockCreatePlansErrorResponse(): array { - return Utils::jsonDecode('{ + return $this->jsonDecodeFunction()('{ "error": { "name" : "UNPROCESSABLE_ENTITY", "message" : "The requested action could not be performed, semantically incorrect, or failed business validation.", diff --git a/tests/Mocks/Responses/CatalogProducts.php b/tests/Mocks/Responses/CatalogProducts.php index e8216fe3..23c728ef 100644 --- a/tests/Mocks/Responses/CatalogProducts.php +++ b/tests/Mocks/Responses/CatalogProducts.php @@ -125,7 +125,7 @@ private function mockGetCatalogProductsResponse(): array */ private function mockGetCatalogProductsErrorResponse(): array { - return Utils::jsonDecode('{ + return $this->jsonDecodeFunction()('{ "error": { "name": "INVALID_REQUEST", "message": "Request is not well-formed, syntactically incorrect, or violates schema.", diff --git a/tests/Mocks/Responses/PartnerReferrals.php b/tests/Mocks/Responses/PartnerReferrals.php index 11fbc39f..025299fb 100644 --- a/tests/Mocks/Responses/PartnerReferrals.php +++ b/tests/Mocks/Responses/PartnerReferrals.php @@ -345,7 +345,7 @@ private function mockShowReferralDataResponse(): array private function mockListSellerTrackingInformationResponse(): array { - return Utils::jsonDecode('{ + return $this->jsonDecodeFunction()('{ "merchant_id": "8LQLM2ML4ZTYU", "tracking_id": "merchantref1", "links": [ @@ -361,7 +361,7 @@ private function mockListSellerTrackingInformationResponse(): array private function mockShowSellerStatusResponse(): array { - return Utils::jsonDecode('{ + return $this->jsonDecodeFunction()('{ "merchant_id": "8LQLM2ML4ZTYU", "products": [ { @@ -493,7 +493,7 @@ private function mockShowSellerStatusResponse(): array private function mockListMerchantCredentialsResponse(): array { - return Utils::jsonDecode('{ + return $this->jsonDecodeFunction()('{ "client_id": "Ab27r3fkrQezHdcPrn2b2SYzPEldXx2dWgv76btVfI-eYF8KRAd2WxXAZyb0ETygSNeHBthzlxjlQ_qw", "client_secret": "EAcTvpnDHZf4icl_2MPnt2gRpOxHVtaQJChWU3PrRbYR4uyvUXV6h4DWQjm7XOfdnk_OrEEWdxY2eUG3", "payer_id": "QVG98CUNMS2PY"