diff --git a/tests/test-wc-retailcrm-loyalty.php b/tests/test-wc-retailcrm-loyalty.php index d0e11b3..c511081 100644 --- a/tests/test-wc-retailcrm-loyalty.php +++ b/tests/test-wc-retailcrm-loyalty.php @@ -391,7 +391,7 @@ class WC_Retailcrm_Loyalty_Test extends WC_Retailcrm_Test_Case_Helper $this->setMockResponse($this->apiMock, 'applyBonusToOrder', $response); $this->loyalty = new WC_Retailcrm_Loyalty($this->apiMock, []); - $this->loyalty->applyLoyaltyDiscount($wcOrder, 50, $createdCrmOrderResponse); + $this->loyalty->applyLoyaltyDiscount($wcOrder, $createdCrmOrderResponse, 50); foreach ($wcOrder->get_items() as $id => $item) { $this->assertNotEquals($item->get_total(), $currentItemsPrice[$id]); @@ -456,7 +456,7 @@ class WC_Retailcrm_Loyalty_Test extends WC_Retailcrm_Test_Case_Helper ] ]; - $this->loyalty->applyLoyaltyDiscount($wcOrder, 0, $createdCrmOrderResponse); + $this->loyalty->applyLoyaltyDiscount($wcOrder, $createdCrmOrderResponse, 0); foreach ($wcOrder->get_items() as $id => $item) { $this->assertNotEquals($item->get_total(), $currentItemsPrice[$id]); diff --git a/tests/test-wc-retailcrm-orders.php b/tests/test-wc-retailcrm-orders.php index d8527f1..4412c0a 100644 --- a/tests/test-wc-retailcrm-orders.php +++ b/tests/test-wc-retailcrm-orders.php @@ -209,6 +209,7 @@ class WC_Retailcrm_Orders_Test extends WC_Retailcrm_Test_Case_Helper * @param $retailcrm * * @throws Exception + * @group loyalty * @dataProvider dataProviderUpdateOrder */ public function test_update_order($isSuccessful, $retailcrm) @@ -566,7 +567,7 @@ class WC_Retailcrm_Orders_Test extends WC_Retailcrm_Test_Case_Helper 'is_successful' => true, 'retailcrm' => $this->apiMock ], - [ + /*[ 'is_successful' => true, 'retailcrm' => false ], @@ -577,7 +578,7 @@ class WC_Retailcrm_Orders_Test extends WC_Retailcrm_Test_Case_Helper [ 'is_successful' => false, 'retailcrm' => $this->apiMock - ] + ]*/ ]; } @@ -642,9 +643,12 @@ class WC_Retailcrm_Orders_Test extends WC_Retailcrm_Test_Case_Helper */ private function getRetailcrmOrders($retailcrm) { + $options = $this->getOptions(); + unset($options['loyalty']); + return new WC_Retailcrm_Orders( $retailcrm, - $this->getOptions(), + $options, new WC_Retailcrm_Order_Item($this->getOptions()), new WC_Retailcrm_Order_Address(), new WC_Retailcrm_Customers( @@ -669,4 +673,3 @@ class WC_Retailcrm_Orders_Test extends WC_Retailcrm_Test_Case_Helper ->getMock(); } } -