Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-11-18 10:08:16 +0300
committerGitHub <noreply@github.com>2019-11-18 10:08:16 +0300
commit60009312a44f1aa728a0f9f6f7e0a8a59068544d (patch)
tree2b037e8abdf08ed024946a6a841757162ea9443f /tests/PHPUnit/Fixtures
parent12011166e3934f1d76f2d183a63cfe2ff9bde8e6 (diff)
Add product name, product category, product sku, product price segments (#15144)
* Add product category segment. * Fix productCategory action, add productName, productSku, productPrice segments. * Hide productCategory1...5 segments in UI/API. * fix tests * Do not select conversion items that are deleted in segments + fix bug in ecommerce item insert (do not fail whole insert if one duplicate primary key is found). * update expected files * Fix unit test.
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r--tests/PHPUnit/Fixtures/TwoSitesEcommerceOrderWithItems.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/PHPUnit/Fixtures/TwoSitesEcommerceOrderWithItems.php b/tests/PHPUnit/Fixtures/TwoSitesEcommerceOrderWithItems.php
index 85753eacb1..9c24915796 100644
--- a/tests/PHPUnit/Fixtures/TwoSitesEcommerceOrderWithItems.php
+++ b/tests/PHPUnit/Fixtures/TwoSitesEcommerceOrderWithItems.php
@@ -114,6 +114,15 @@ class TwoSitesEcommerceOrderWithItems extends Fixture
$t->setCustomVariable(3, 'VisitorName', 'Great name!', 'visit');
$t->addEcommerceItem($sku = 'SKU VERY nice indeed', $name = 'PRODUCT name', $category = 'Electronics & Cameras', $price = 500, $quantity = 1);
$t->addEcommerceItem($sku = 'SKU VERY nice indeed', $name = 'PRODUCT name', $category = 'Electronics & Cameras', $price = 500, $quantity = 2);
+ $t->addEcommerceItem($sku = 'SKU VERY nice indeed REMOVED', $name = 'PRODUCT name REMOVED', $category = 'Electronics & Cameras REMOVED', $price = 300, $quantity = 1);
+ $t->addEcommerceItem($sku = 'SKU WILL BE DELETED', $name = 'BLABLA DELETED', $category = '', $price = 5000000, $quantity = 20);
+ self::checkResponse($t->doTrackEcommerceCartUpdate($grandTotal = 1300));
+
+ // REMOVE FROM CART
+ $t->setForceVisitDateTime(Date::factory($this->dateTime)->addHour(1.95)->getDatetime());
+ $t->setCustomVariable(3, 'VisitorName', 'Great name!', 'visit');
+ $t->addEcommerceItem($sku = 'SKU VERY nice indeed', $name = 'PRODUCT name', $category = 'Electronics & Cameras', $price = 500, $quantity = 1);
+ $t->addEcommerceItem($sku = 'SKU VERY nice indeed', $name = 'PRODUCT name', $category = 'Electronics & Cameras', $price = 500, $quantity = 2);
$t->addEcommerceItem($sku = 'SKU WILL BE DELETED', $name = 'BLABLA DELETED', $category = '', $price = 5000000, $quantity = 20);
self::checkResponse($t->doTrackEcommerceCartUpdate($grandTotal = 1000));