From 6fb14b528c10ee5b6ca404437b0ae7f461bf5d6d Mon Sep 17 00:00:00 2001 From: Danae Millan Date: Wed, 10 Jul 2024 10:43:02 -0600 Subject: [PATCH] Remove unnecessary creation of tokens --- ...e-subscriptions-repairer-legacy-sepa-tokens.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php b/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php index 895c18b54..4f29dd058 100644 --- a/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php +++ b/tests/phpunit/admin/migrations/test-class-wc-stripe-subscriptions-repairer-legacy-sepa-tokens.php @@ -254,17 +254,11 @@ function ( $id ) { } ); - $ids_to_migrate = $this->get_subs_ids_to_migrate(); - $subscription_id = $ids_to_migrate[0]; - $subscription = new WC_Subscription( $subscription_id ); - $customer_id = $subscription->get_user_id(); - - // Create the legacy token associated with the subscription. + $ids_to_migrate = $this->get_subs_ids_to_migrate(); + $subscription_id = $ids_to_migrate[0]; + $subscription = new WC_Subscription( $subscription_id ); + $customer_id = $subscription->get_user_id(); $original_source_id = $subscription->get_meta( self::SOURCE_ID_META_KEY ); - $original_token = WC_Helper_Token::create_sepa_token( $original_source_id, $customer_id, $this->legacy_sepa_gateway_id ); - - // Create the updated token we expect the subscription to be updated with. - $updated_token = WC_Helper_Token::create_sepa_token( $original_source_id, $customer_id, $this->updated_sepa_gateway_id ); $this->logger_mock ->expects( $this->at( 0 ) )