Skip to content

Commit 8d0b834

Browse files
MC-21001: Add/move/delete attribute for attribute sets
1 parent 95e38b6 commit 8d0b834

File tree

1 file changed

+4
-2
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute

1 file changed

+4
-2
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/SetTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ public function testSaveWithGroupsAndAttributes(string $groupName, string $attri
105105
];
106106
$set->organizeData($this->getAttributeSetData($additional));
107107
$this->attributeSetResource->save($set);
108-
$groupId = $this->getAttributeGroup($groupName)->getAttributeGroupId();
108+
$groupId = $attributeGroup
109+
? $attributeGroup->getAttributeGroupId()
110+
: $this->getAttributeGroup($groupName)->getAttributeGroupId();
109111
$this->config->clear();
110112
$setInfo = $this->attributeSetResource->getSetInfo([$attributeId], $this->defaultSetId);
111113
$expectedInfo = [
@@ -230,7 +232,7 @@ private function getAttributeSetData(array $additional): array
230232
* Returns attribute group by name.
231233
*
232234
* @param string $groupName
233-
* @return AttributeGroupInterface|Group|null
235+
* @return AttributeGroupInterface|null
234236
*/
235237
private function getAttributeGroup(string $groupName): ?AttributeGroupInterface
236238
{

0 commit comments

Comments
 (0)