From c5c547af2635e36bc0e46e039b23e7b110797195 Mon Sep 17 00:00:00 2001 From: Karthik Thayyil Date: Wed, 4 Sep 2024 21:42:48 +0100 Subject: [PATCH] check method for exactly 3 get calls and remove redundant 4th step. --- tests/Unit/MerchantCenter/MerchantCenterServiceTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php b/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php index b220a46c38..dfd45aff29 100644 --- a/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php +++ b/tests/Unit/MerchantCenter/MerchantCenterServiceTest.php @@ -511,11 +511,10 @@ public function test_get_setup_status_step_paid_ads() { $this->options->method( 'get_merchant_id' )->willReturn( 1234 ); $this->merchant_account_state->method( 'last_incomplete_step' )->willReturn( '' ); $this->ads_service->method( 'connected_account' )->willReturn( true ); - $this->options->method( 'get' ) + $this->options->expects( $this->exactly( 3 ) )->method( 'get' ) ->withConsecutive( [ OptionsInterface::MC_SETUP_COMPLETED_AT, false ], [ OptionsInterface::TARGET_AUDIENCE ], - [ OptionsInterface::MERCHANT_CENTER, [] ], [ OptionsInterface::MERCHANT_CENTER, [] ] )->willReturnOnConsecutiveCalls( false, @@ -523,7 +522,6 @@ public function test_get_setup_status_step_paid_ads() { 'location' => 'selected', 'countries' => [ 'GB' ], ], - [], [] ); $this->shipping_time_query->method( 'get_results' )