Skip to content

Commit 90c8216

Browse files
committed
MAGETWO-48489: Fix Unit tests
- Fixed static tests
1 parent 4ee6c76 commit 90c8216

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

app/code/Magento/Catalog/Model/Indexer/Product/Flat/AbstractAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
/**
1313
* Abstract action reindex class
14+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1415
*/
1516
abstract class AbstractAction
1617
{

app/code/Magento/ConfigurableProduct/Model/OptionRepository.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class OptionRepository implements \Magento\ConfigurableProduct\Api\OptionReposit
8585
* @param \Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable $configurableTypeResource
8686
* @param MetadataPool $metadataPool
8787
* @param Loader $optionLoader
88+
*
89+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8890
*/
8991
public function __construct(
9092
\Magento\Catalog\Api\ProductRepositoryInterface $productRepository,

app/code/Magento/ConfigurableProduct/Model/Plugin/AroundProductRepositorySave.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ private function validateProductLinks(array $attributeCodes, array $linkIds)
111111
}
112112
if (isset($valueMap[$valueKey])) {
113113
throw new InputException(
114-
__('Products "%1" and "%2" have the same set of attribute values.', $productId, $valueMap[$valueKey])
114+
__(
115+
'Products "%1" and "%2" have the same set of attribute values.',
116+
$productId,
117+
$valueMap[$valueKey]
118+
)
115119
);
116120
}
117121
$valueMap[$valueKey] = $productId;

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Attribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public function getOptions()
8787
{
8888
return $this->getData('options');
8989
}
90+
9091
/**
9192
* {@inheritdoc}
9293
*/
@@ -182,6 +183,7 @@ public function getValues()
182183
}
183184

184185
//@codeCoverageIgnoreStart
186+
185187
/**
186188
* @param string $attributeId
187189
* @return $this

app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/AroundProductRepositorySaveTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
namespace Magento\ConfigurableProduct\Test\Unit\Model\Plugin;
77

88
use Magento\Catalog\Api\Data\ProductAttributeInterface;
9-
use Magento\Catalog\Api\Data\ProductExtensionInterface;
109
use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
1110
use Magento\Catalog\Api\ProductRepositoryInterface;
1211
use Magento\Catalog\Model\Product;
1312
use Magento\Catalog\Model\ProductFactory;
1413
use Magento\ConfigurableProduct\Api\Data\OptionInterface;
1514
use Magento\ConfigurableProduct\Model\Plugin\AroundProductRepositorySave;
1615
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
16+
use Magento\ConfigurableProduct\Test\Unit\Model\Product\ProductExtensionAttributes;
1717
use PHPUnit_Framework_MockObject_MockObject as MockObject;
18-
use \Magento\ConfigurableProduct\Test\Unit\Model\Product\ProductExtensionAttributes;
1918

2019
/**
2120
* Class AroundProductRepositorySaveTest
21+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2222
*/
2323
class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
2424
{

0 commit comments

Comments
 (0)