Skip to content

Commit 7f04255

Browse files
committed
MC-20694: Admin: Delete attribute set
1 parent 94277ef commit 7f04255

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

dev/tests/integration/testsuite/Magento/Catalog/_files/attribute_set_based_on_default_with_custom_group.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
declare(strict_types=1);
77

88
use Magento\Catalog\Api\Data\ProductAttributeInterface;
9-
use Magento\Catalog\Api\Data\ProductInterface;
109
use Magento\Eav\Api\AttributeSetRepositoryInterface;
1110
use Magento\Eav\Api\Data\AttributeGroupInterface;
1211
use Magento\Eav\Api\Data\AttributeSetInterfaceFactory;
@@ -21,8 +20,6 @@
2120
$attributeSetFactory = $objectManager->get(AttributeSetInterfaceFactory::class);
2221
/** @var Type $entityType */
2322
$entityType = $objectManager->create(Type::class)->loadByCode(ProductAttributeInterface::ENTITY_TYPE_CODE);
24-
/** @var ProductInterface $product */
25-
$product = $objectManager->create(ProductInterface::class);
2623
$attributeSet = $attributeSetFactory->create(
2724
[
2825
'data' => [
@@ -37,7 +34,7 @@
3734
$attributeSet->setHasDataChanges(true);
3835
$attributeSet->validate();
3936
$attributeSetRepository->save($attributeSet);
40-
$attributeSet->initFromSkeleton($product->getDefaultAttributeSetid());
37+
$attributeSet->initFromSkeleton($entityType->getDefaultAttributeSetId());
4138
/** @var AttributeGroupInterface $newGroup */
4239
$newGroup = $objectManager->get(GroupFactory::class)->create();
4340
$newGroup->setId(null)

0 commit comments

Comments
 (0)