Skip to content

Commit 2ed496a

Browse files
committed
MC-20689: Admin: Create new attribute set
1 parent b688f57 commit 2ed496a

File tree

1 file changed

+4
-5
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Set

1 file changed

+4
-5
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Set/SaveTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ private function createAttributeSetBySkeletonAndAssert(
310310
);
311311
$this->dispatch('backend/catalog/product_set/save/');
312312
$this->assertSessionMessages(
313-
$this->contains('You saved the attribute set.'),
313+
$this->equalTo([(string)__('You saved the attribute set.')]),
314314
MessageInterface::TYPE_SUCCESS
315315
);
316316
$createdAttributeSet = $this->getAttributeSetByName($attributeSetName);
@@ -339,16 +339,15 @@ private function assertAttributeSetsAttributesAreEquals(
339339
$existAttributeSet->getAttributeSetId()
340340
)
341341
);
342+
sort($expectedAttributeIds);
342343
$actualAttributeIds = array_keys(
343344
$this->attributeManagement->getAttributes(
344345
ProductAttributeInterface::ENTITY_TYPE_CODE,
345346
$createdAttributeSet->getAttributeSetId()
346347
)
347348
);
348-
$this->assertEquals(count($expectedAttributeIds), count($actualAttributeIds));
349-
foreach ($actualAttributeIds as $attributeId) {
350-
$this->assertContains($attributeId, $expectedAttributeIds);
351-
}
349+
sort($actualAttributeIds);
350+
$this->assertSame($expectedAttributeIds, $actualAttributeIds);
352351
}
353352

354353
/**

0 commit comments

Comments
 (0)