From 617845d9208e7cb29ee001d17d301683ef09d47f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB?= Date: Thu, 9 Apr 2020 11:35:11 +0300 Subject: [PATCH] several fixes for tests --- tests/order/test-wc-retailcrm-order-payment.php | 4 +++- tests/test-wc-retailcrm-customers.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/order/test-wc-retailcrm-order-payment.php b/tests/order/test-wc-retailcrm-order-payment.php index d2b78a5..6f029f8 100644 --- a/tests/order/test-wc-retailcrm-order-payment.php +++ b/tests/order/test-wc-retailcrm-order-payment.php @@ -29,7 +29,9 @@ class WC_Retailcrm_Order_Payment_Test extends WC_Retailcrm_Test_Case_Helper */ public function test_build($externalId) { - $order_payment = new WC_Retailcrm_Order_Payment($this->getOptions()); + $settings = $this->getOptions(); + $settings['send_payment_amount'] = 'no'; + $order_payment = new WC_Retailcrm_Order_Payment($settings); $data = $order_payment->build($this->order, $externalId)->get_data(); diff --git a/tests/test-wc-retailcrm-customers.php b/tests/test-wc-retailcrm-customers.php index 0b1ab89..1c77a25 100644 --- a/tests/test-wc-retailcrm-customers.php +++ b/tests/test-wc-retailcrm-customers.php @@ -38,6 +38,8 @@ class WC_Retailcrm_Customers_Test extends WC_Retailcrm_Test_Case_Helper ->willReturn($this->responseMock); $this->customer = new WC_Customer(); + $this->customer->set_first_name('Tester'); + $this->customer->set_last_name('Tester'); $this->customer->set_email(uniqid(md5(date('Y-m-d H:i:s'))) . '@mail.com'); $this->customer->set_billing_email($this->customer->get_email()); $this->customer->set_password('password');