Skip to content

Commit 5fe77c2

Browse files
author
Roman Liukshyn
committed
Merge branch 'develop' of github.corp.magento.com:magento2/magento2ce into MPI-BUGFIXES
2 parents f0c1760 + 2a71879 commit 5fe77c2

File tree

7 files changed

+29
-3
lines changed

7 files changed

+29
-3
lines changed

Diff for: app/code/Magento/Checkout/Model/Cart.php

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* Shopping cart model
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
* @deprecated
1718
*/
1819
class Cart extends DataObject implements CartInterface
1920
{

Diff for: app/code/Magento/Checkout/Model/Cart/CartInterface.php

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Shopping cart interface
1212
*
1313
* @author Magento Core Team <[email protected]>
14+
* @deprecated
1415
*/
1516
interface CartInterface
1617
{

Diff for: app/code/Magento/Checkout/Model/Sidebar.php

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
use Magento\Quote\Api\Data\CartItemInterface;
1313
use Magento\Quote\Model\Quote\Address\Total;
1414

15+
/**
16+
* @deprecated
17+
*/
1518
class Sidebar
1619
{
1720
/**

Diff for: app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php

+9
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,15 @@ public function getAssociatedProducts($product)
219219
return $product->getData($this->_keyAssociatedProducts);
220220
}
221221

222+
/**
223+
* @param \Magento\Catalog\Model\Product $product
224+
* @return \Magento\Catalog\Model\Product
225+
*/
226+
public function flushAssociatedProductsCache($product)
227+
{
228+
return $product->unsData($this->_keyAssociatedProducts);
229+
}
230+
222231
/**
223232
* Add status filter to collection
224233
*

Diff for: app/code/Magento/GroupedProduct/Test/Unit/Model/Product/Type/GroupedTest.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ public function testPrepareForCartAdvancedEmpty()
375375
$this->_model->prepareForCartAdvanced($buyRequest, $this->product)
376376
);
377377

378-
379378
$buyRequest->setSuperGroup(1);
380379
$this->assertEquals(
381380
$expectedMsg,
@@ -603,4 +602,14 @@ public function testPrepareForCartAdvancedZeroQty()
603602
->will($this->returnValue([$associatedProduct]));
604603
$this->assertEquals($expectedMsg, $this->_model->prepareForCartAdvanced($buyRequest, $this->product));
605604
}
605+
606+
public function testFlushAssociatedProductsCache()
607+
{
608+
$productMock = $this->getMock('\Magento\Catalog\Model\Product', ['unsData'], [], '', false);
609+
$productMock->expects($this->once())
610+
->method('unsData')
611+
->with('_cache_instance_associated_products')
612+
->willReturnSelf();
613+
$this->assertEquals($productMock, $this->_model->flushAssociatedProductsCache($productMock));
614+
}
606615
}

Diff for: dev/tests/functional/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"magento/mtf": "1.0.0-rc41",
3+
"magento/mtf": "1.0.0-rc42",
44
"php": "~5.5.22|~5.6.0|~7.0.0",
55
"phpunit/phpunit": "4.1.0",
66
"phpunit/phpunit-selenium": ">=1.2"

Diff for: dev/tests/functional/lib/Magento/Mtf/System/Observer/WebapiResponse.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class WebapiResponse extends AbstractObserver
2727
public function process(Event $event)
2828
{
2929
$directory = $this->createDestinationDirectory('webapi-response');
30-
$this->logger->log(json_encode($event->getSubjects()[0]), $directory . '/' . $event->getIdentifier() . '.json');
30+
$this->logger->log(
31+
json_encode($event->getSubjects()[0]),
32+
$directory . '/' . $event->getFileIdentifier() . '.json'
33+
);
3134
}
3235
}

0 commit comments

Comments
 (0)