Skip to content

Commit dddabae

Browse files
Andrei KuprienkaAndrei Kuprienka
authored andcommitted
MAGNIMEX-120: Update unittests
- Fix code styles.
1 parent 1da5540 commit dddabae

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/CategoryProcessorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ protected function setUp()
7575
$categoryCollection->expects($this->exactly(3))
7676
->method('addAttributeToSelect')
7777
->withConsecutive(
78-
array('name'),
79-
array('url_key'),
80-
array('url_path')
78+
['name'],
79+
['url_key'],
80+
['url_path']
8181
)
8282
->will($this->returnSelf());
8383

app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/Plugin/ImportTest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
use Magento\UrlRewrite\Service\V1\Data\UrlRewrite;
1717
use Magento\UrlRewrite\Model\OptionProvider;
1818

19+
/**
20+
* Class ImportTest
21+
*
22+
* @SuppressWarnings(PHPMD.TooManyFields)
23+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
24+
*/
1925
class ImportTest extends \PHPUnit_Framework_TestCase
2026
{
2127

@@ -162,6 +168,12 @@ class ImportTest extends \PHPUnit_Framework_TestCase
162168
*/
163169
protected $objectManagerHelper;
164170

171+
/**
172+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
173+
* @SuppressWarnings(PHPMD.TooManyFields)
174+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
175+
* @SuppressWarnings(PHPMD.NPathComplexity)
176+
*/
165177
public function setUp()
166178
{
167179
$this->importProduct = $this->getMock(
@@ -393,6 +405,8 @@ public function setUp()
393405
* @covers \Magento\CatalogUrlRewrite\Model\Product\Plugin\Import::isGlobalScope
394406
* @covers \Magento\CatalogUrlRewrite\Model\Product\Plugin\Import::populateGlobalProduct
395407
* @covers \Magento\CatalogUrlRewrite\Model\Product\Plugin\Import::addProductToImport
408+
*
409+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
396410
*/
397411
public function testAfterImportData()
398412
{
@@ -997,7 +1011,6 @@ public function testCurrentUrlRewritesRegenerateIsAutogeneratedWithCategory()
9971011
->will($this->returnValue(true));
9981012
$this->productUrlPathGenerator->expects($this->once())->method('getUrlPathWithSuffix')
9991013
->will($this->returnValue($targetPath));
1000-
$category = $this->getMock('Magento\Catalog\Model\Category', [], [], '', false);
10011014
$this->currentUrlRewritesRegeneratorPrepareUrlRewriteMock(
10021015
$storeId,
10031016
$productId,

0 commit comments

Comments
 (0)