Skip to content

Commit 507051b

Browse files
author
Joan He
committed
MAGETWO-91529: Restricted admin user can remove product from other websites
- Fix static test failures
1 parent ab33715 commit 507051b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/AttributeSetTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ public function testModifyMetaLocked($locked)
9999
->method('isLockedAttribute')
100100
->willReturn($locked);
101101
$modifyMeta = $this->getModel()->modifyMeta([AbstractModifier::DEFAULT_GENERAL_PANEL => []]);
102-
$this->assertEquals($locked,
103-
$modifyMeta[AbstractModifier::DEFAULT_GENERAL_PANEL]['children']['attribute_set_id']['arguments']['data']['config']['disabled']);
102+
$children = $modifyMeta[AbstractModifier::DEFAULT_GENERAL_PANEL]['children'];
103+
$this->assertEquals(
104+
$locked,
105+
$children['attribute_set_id']['arguments']['data']['config']['disabled']
106+
);
104107
}
105108

106109
public function modifyMetaLockedDataProvider()

app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/EavTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ function ($value) use ($attributeOptionsExpected) {
546546

547547
/**
548548
* @return array
549+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
549550
*/
550551
public function setupAttributeMetaDataProvider()
551552
{

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
*
4242
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
4343
* @SuppressWarnings(PHPMD.TooManyFields)
44+
* @SuppressWarnings(PHPMD.NPathComplexity)
4445
* @since 101.0.0
4546
*/
4647
class Eav extends AbstractModifier

0 commit comments

Comments
 (0)