From e7270aac4b9ff9ef93a6d41bfe332851aa5cd5f8 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Thu, 20 Feb 2020 10:26:40 +0300 Subject: [PATCH] fix for OC 3 --- tests/RoboFile.php | 13 ++++++++++--- tests/opencart_sample_data.sql | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/RoboFile.php b/tests/RoboFile.php index e7d36d4..bdeab3a 100644 --- a/tests/RoboFile.php +++ b/tests/RoboFile.php @@ -72,7 +72,14 @@ class RoboFile extends \Robo\Tasks public function opencartSetup() { - $this->taskDeleteDir('www')->run(); + $startUp = getenv('TEST_SUITE') === '2.3' + ? 'catalog/controller/startup/test_startup.php' + : 'admin/controller/startup/test_startup.php'; + $startUpTo = getenv('TEST_SUITE') === '2.3' + ? 'catalog/controller/startup/test_startup.php' + : 'admin/controller/startup/test_startup.php'; + + $this->taskDeleteDir($this->root_dir . 'www')->run(); $this->taskFileSystemStack() ->mirror( $this->root_dir . 'vendor/opencart/opencart/upload', @@ -83,8 +90,8 @@ class RoboFile extends \Robo\Tasks $this->root_dir . 'www/system/config/test-config.php' ) ->copy( - $this->root_dir . 'vendor/beyondit/opencart-test-suite/src/upload/catalog/controller/startup/test_startup.php', - $this->root_dir . 'www/catalog/controller/startup/test_startup.php' + $this->root_dir . 'vendor/beyondit/opencart-test-suite/src/upload/' . $startUp, + $this->root_dir . 'www/' . $startUpTo ) ->chmod($this->root_dir . 'www', 0777, 0000, true) ->run(); diff --git a/tests/opencart_sample_data.sql b/tests/opencart_sample_data.sql index 3e468f0..7e872ef 100644 --- a/tests/opencart_sample_data.sql +++ b/tests/opencart_sample_data.sql @@ -1,5 +1,5 @@ TRUNCATE TABLE `oc_customer`; -INSERT INTO `oc_customer` (`customer_id`, `customer_group_id`, `store_id`, `language_id`, `firstname`, `lastname`, `email`, `telephone`, `fax`, `password`, `salt`, `cart`, `wishlist`, `newsletter`, `address_id`, `custom_field`, `ip`, `status`, `approved`, `safe`, `token`, `code`, `date_added`) VALUES ('1', '1', '0', '1', 'Test', 'Test', 'test@mail.ru', '+7 (000) 000-00-00', '', 'ed3798da75d6cdd695e99e87a60d587a10aa95ff', '51TalnrgH', '', '', '0', '1', '', '172.21.0.1', '1', '1', '0', '', '', '2018-06-07 13:50:08'); +INSERT INTO `oc_customer` (`customer_id`, `customer_group_id`, `store_id`, `language_id`, `firstname`, `lastname`, `email`, `telephone`, `fax`, `password`, `salt`, `cart`, `wishlist`, `newsletter`, `address_id`, `custom_field`, `ip`, `status`, `safe`, `token`, `code`, `date_added`) VALUES ('1', '1', '0', '1', 'Test', 'Test', 'test@mail.ru', '+7 (000) 000-00-00', '', 'ed3798da75d6cdd695e99e87a60d587a10aa95ff', '51TalnrgH', '', '', '0', '1', '', '172.21.0.1', '1', '0', '', '', '2018-06-07 13:50:08'); TRUNCATE TABLE `oc_customer_activity`; TRUNCATE TABLE `oc_customer_group`;