From 9985d9d91c81b87481fbfd221b0370627c6f5183 Mon Sep 17 00:00:00 2001 From: Ivan Chaplygin Date: Tue, 4 Feb 2025 17:19:33 +0300 Subject: [PATCH] Update tests Update module version --- CHANGELOG.md | 3 +++ VERSION | 2 +- src/readme.txt | 5 ++++- src/retailcrm.php | 4 ++-- src/uninstall.php | 2 +- tests/test-wc-retailcrm-uploader.php | 22 ++++++++++++++++++++-- 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c1d928..6c49d17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2025-02-04 4.8.19 +* Optimization of order unloading + ## 2025-02-03 4.8.18 * Added additional parameters to GET requests diff --git a/VERSION b/VERSION index b5de5f0..1e10d52 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.8.18 +4.8.19 diff --git a/src/readme.txt b/src/readme.txt index fdc96a4..de92e1f 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla Requires PHP: 7.1 Requires at least: 5.3 Tested up to: 6.5 -Stable tag: 4.8.18 +Stable tag: 4.8.19 License: GPLv1 or later License URI: http://www.gnu.org/licenses/gpl-1.0.html @@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == += 4.8.19 = +* Optimization of order unloading + = 4.8.18 = * Added additional parameters to GET requests diff --git a/src/retailcrm.php b/src/retailcrm.php index 01af638..8c17de5 100644 --- a/src/retailcrm.php +++ b/src/retailcrm.php @@ -5,7 +5,7 @@ * Description: Integration plugin for WooCommerce & Simla.com * Author: RetailDriver LLC * Author URI: http://retailcrm.pro/ - * Version: 4.8.18 + * Version: 4.8.19 * Tested up to: 6.5 * Requires Plugins: woocommerce * WC requires at least: 5.4 @@ -27,7 +27,7 @@ if (!class_exists( 'WC_Integration_Retailcrm')) : class WC_Integration_Retailcrm { const WOOCOMMERCE_SLUG = 'woocommerce'; const WOOCOMMERCE_PLUGIN_PATH = 'woocommerce/woocommerce.php'; - const MODULE_VERSION = '4.8.18'; + const MODULE_VERSION = '4.8.19'; private static $instance; diff --git a/src/uninstall.php b/src/uninstall.php index 0619379..7a232fd 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.8.18 + * @version 4.8.19 * * @package RetailCRM */ diff --git a/tests/test-wc-retailcrm-uploader.php b/tests/test-wc-retailcrm-uploader.php index eec6ff3..901b37f 100644 --- a/tests/test-wc-retailcrm-uploader.php +++ b/tests/test-wc-retailcrm-uploader.php @@ -36,7 +36,8 @@ class WC_Retailcrm_Uploader_Test extends WC_Retailcrm_Test_Case_Helper 'getCountOrders', 'customersGet', 'customersList', - 'ordersCreate' + 'ordersCreate', + 'ordersUpload' )) ->getMock(); @@ -82,7 +83,7 @@ class WC_Retailcrm_Uploader_Test extends WC_Retailcrm_Test_Case_Helper /** * @param $retailcrm - * @dataProvider dataProviderApiClient + * @dataProvider dataProviderApiClientForUpload */ public function test_order_upload($retailcrm) { @@ -134,6 +135,23 @@ class WC_Retailcrm_Uploader_Test extends WC_Retailcrm_Test_Case_Helper ); } + public function dataProviderApiClientForUpload() + { + $this->setUp(); + + $apiMock = (clone $this->apiMock); + $apiMock->expects($this->once())->method('ordersUpload'); + + return array( + array( + 'retailcrm' => $apiMock + ), + array( + 'retailcrm' => false + ) + ); + } + /** * @param $retailcrm *