Skip to content

Commit 1b05274

Browse files
committed
Merge remote-tracking branch 'tango-ce/MAGETWO-56116' into MAGETWO-56116
2 parents b4fbcac + 7d1003b commit 1b05274

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/StorageTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use Magento\CatalogUrlRewrite\Model\Category\Product;
1515
use Magento\CatalogUrlRewrite\Model\ResourceModel\Category\Product as ProductResourceModel;
1616

17+
/**
18+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
19+
*/
1720
class StorageTest extends \PHPUnit_Framework_TestCase
1821
{
1922
/**

app/code/Magento/ConfigurableProduct/Test/Unit/Controller/Adminhtml/Product/Builder/PluginTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ protected function setUp()
7171
$this->requestMock = $this->getMock(\Magento\Framework\App\Request\Http::class, [], [], '', false);
7272
$methods = ['setTypeId', 'getAttributes', 'addData', 'setWebsiteIds', '__wakeup'];
7373
$this->productMock = $this->getMock(\Magento\Catalog\Model\Product::class, $methods, [], '', false);
74-
$product = $this->productMock;
7574
$attributeMethods = [
7675
'getId',
7776
'getFrontend',

app/code/Magento/ConfigurableProduct/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66
namespace Magento\ConfigurableProduct\Test\Unit\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin;
77

8+
use \Magento\ConfigurableProduct\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin\ConfigurableProduct
9+
as InitializerOptionPlugin;
10+
811
class ConfigurableProductTest extends \PHPUnit_Framework_TestCase
912
{
1013
/**
@@ -22,24 +25,36 @@ public function testAfterGetStockItem(array $data)
2225
);
2326

2427
$quoteItemMock = $this->getMock(
25-
\Magento\Quote\Model\Quote\Item::class, ['getProductType', '__wakeup'], [], '', false
28+
\Magento\Quote\Model\Quote\Item::class,
29+
['getProductType', '__wakeup'],
30+
[],
31+
'',
32+
false
2633
);
2734
$quoteItemMock->expects($this->once())
2835
->method('getProductType')
2936
->will($this->returnValue($data['product_type']));
3037

3138
$stockItemMock = $this->getMock(
32-
\Magento\CatalogInventory\Model\Stock\Item::class, ['setProductName', '__wakeup'], [], '', false
39+
\Magento\CatalogInventory\Model\Stock\Item::class,
40+
['setProductName', '__wakeup'],
41+
[],
42+
'',
43+
false
3344
);
3445
$matcherMethod = $data['matcher_method'];
3546
$stockItemMock->expects($this->$matcherMethod())
3647
->method('setProductName');
3748

3849
$optionMock = $this->getMock(
39-
\Magento\Quote\Model\Quote\Item\Option::class, ['getProduct', '__wakeup'], [], '', false
50+
\Magento\Quote\Model\Quote\Item\Option::class,
51+
['getProduct', '__wakeup'],
52+
[],
53+
'',
54+
false
4055
);
4156

42-
$model = new \Magento\ConfigurableProduct\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin\ConfigurableProduct();
57+
$model = new InitializerOptionPlugin();
4358
$model->afterGetStockItem($subjectMock, $stockItemMock, $optionMock, $quoteItemMock, 0);
4459
}
4560

0 commit comments

Comments
 (0)