Skip to content

Commit f4d4666

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-39614' into BUGS
2 parents 76cb4ac + 4a142b1 commit f4d4666

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

app/code/Magento/Reports/Model/Event/Observer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function catalogProductView(\Magento\Framework\Event\Observer $observer)
151151
$productId = $observer->getEvent()->getProduct()->getId();
152152

153153
$viewData['product_id'] = $productId;
154-
154+
$viewData['store_id'] = $this->_storeManager->getStore()->getId();
155155
if ($this->_customerSession->isLoggedIn()) {
156156
$viewData['customer_id'] = $this->_customerSession->getCustomerId();
157157
} else {

app/code/Magento/Reports/Test/Unit/Model/Event/ObserverTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public function setUp()
8585

8686
/** @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject $storeManager */
8787
$storeManager = $this->getMock('Magento\Store\Model\StoreManagerInterface');
88-
8988
$this->storeMock = $this->getMockBuilder('\Magento\Store\Model\Store')
9089
->disableOriginalConstructor()->getMock();
9190

@@ -128,7 +127,8 @@ public function testCatalogProductViewCustomer()
128127
$storeId = 1;
129128
$expectedViewedData = [
130129
'product_id' => $productId,
131-
'customer_id' => $customerId
130+
'customer_id' => $customerId,
131+
'store_id' => $storeId,
132132
];
133133

134134
$expectedEventData = [
@@ -160,7 +160,8 @@ public function testCatalogProductViewVisitor()
160160
$storeId = 1;
161161
$expectedViewedData = [
162162
'product_id' => $productId,
163-
'visitor_id' => $visitorId
163+
'visitor_id' => $visitorId,
164+
'store_id' => $storeId,
164165
];
165166

166167
$expectedEventData = [

0 commit comments

Comments
 (0)