From cb6fa6eb9f78e0e7cae71436d9efcc6fec52bcbb Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Fri, 23 May 2025 18:08:29 +0200
Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fix=20=E2=80=9Cdata=20structure=20w?=
=?UTF-8?q?ith=20flags=E2=80=9D=20tests?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Following default assuptions changed:
1. The "BILLING_AGREEMENT” feature is always sent
2. The “PAYPAL_WALLET_VAULTING_ADVANCED” flag only depends on the ACDC eligbility (not subscription-opt-in)
---
.../ApiClient/Repository/PartnerReferralsDataTest.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/PHPUnit/ApiClient/Repository/PartnerReferralsDataTest.php b/tests/PHPUnit/ApiClient/Repository/PartnerReferralsDataTest.php
index bba8db5db..d975918b3 100644
--- a/tests/PHPUnit/ApiClient/Repository/PartnerReferralsDataTest.php
+++ b/tests/PHPUnit/ApiClient/Repository/PartnerReferralsDataTest.php
@@ -127,6 +127,7 @@ class PartnerReferralsDataTest extends TestCase {
true, // With cards?
true, // ACDC eligible?
[
+ 'capabilities' => [ 'PAYPAL_WALLET_VAULTING_ADVANCED' ],
'show_add_credit_card' => true,
'has_vault_features' => false,
],
@@ -136,6 +137,7 @@ class PartnerReferralsDataTest extends TestCase {
false, // With cards?
true, // ACDC eligible?
[
+ 'capabilities' => [ 'PAYPAL_WALLET_VAULTING_ADVANCED' ],
'show_add_credit_card' => false,
'has_vault_features' => false,
],
@@ -249,9 +251,7 @@ class PartnerReferralsDataTest extends TestCase {
$expected['partner_config_override']['show_add_credit_card'] = $expected_changes['show_add_credit_card'];
- if ( $has_subscriptions ) {
- $expected['operations'][0]['api_integration_preference']['rest_api_integration']['first_party_details']['features'][] = 'BILLING_AGREEMENT';
- }
+ $expected['operations'][0]['api_integration_preference']['rest_api_integration']['first_party_details']['features'][] = 'BILLING_AGREEMENT';
if ( $expected_changes['has_vault_features'] ) {
$expected['operations'][0]['api_integration_preference']['rest_api_integration']['first_party_details']['features'][] = 'FUTURE_PAYMENT';