Skip to content

Commit 7b2b5e3

Browse files
author
Graham Wharton
committed
Fixed static test failures
1 parent c340802 commit 7b2b5e3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

app/code/Magento/CatalogUrlRewrite/Observer/ProductProcessUrlRewriteSavingObserver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public function __construct(
9696
* @param Observer $observer
9797
* @return void
9898
* @throws UrlAlreadyExistsException
99+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
99100
*/
100101
public function execute(Observer $observer)
101102
{

app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteSavingObserverTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ protected function setUp()
127127
$this->stores[2] = $this->initialiseStore(2, 2);
128128
$this->stores[5] = $this->initialiseStore(5, 2);
129129

130-
$this->product = $this->initialiseProduct($this->stores[0], 0);
130+
$this->product = $this->initialiseProduct();
131131

132-
$this->productCollection = $this->createPartialMock(Collection::class,
132+
$this->productCollection = $this->createPartialMock(
133+
Collection::class,
133134
['getAllAttributeValues']
134135
);
135136

@@ -199,11 +200,9 @@ protected function setUp()
199200
/**
200201
* Initialise product for test
201202
*
202-
* @param $store
203-
* @param $storeId
204203
* @return MockObject
205204
*/
206-
public function initialiseProduct($store, $storeId)
205+
public function initialiseProduct()
207206
{
208207
$product = $this->createPartialMock(
209208
Product::class,
@@ -253,6 +252,7 @@ public function initialiseStore($storeId, $websiteId)
253252
* Data provider
254253
*
255254
* @return array
255+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
256256
*/
257257
public function urlKeyDataProvider()
258258
{
@@ -477,9 +477,9 @@ public function urlKeyDataProvider()
477477
* @param int $productInWebsites
478478
* @param int $expectedReplaceCount
479479
* @param array $expectedRemoves
480+
* @throws UrlAlreadyExistsException
480481
*
481482
* @dataProvider urlKeyDataProvider
482-
* @throws UrlAlreadyExistsException
483483
*/
484484
public function testExecuteUrlKey(
485485
$productScope,

0 commit comments

Comments
 (0)