Skip to content

Commit 04b071e

Browse files
author
Dmytro Vilchynskyi
committed
MAGETWO-36129: Update Content in Magento 2 by Modules - part 1
- fixed tests
1 parent 88200c9 commit 04b071e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function execute()
106106
->setName($name)
107107
->getAttributeSet();
108108
} catch (AlreadyExistsException $alreadyExists) {
109-
$this->messageManager->addError(__('Product Template named \'%1\' already exists.', $name));
109+
$this->messageManager->addError(__('An attribute set named \'%1\' already exists.', $name));
110110
$this->messageManager->setAttributeData($data);
111111
return $resultRedirect->setPath('catalog/*/edit', ['_current' => true]);
112112
} catch (\Magento\Framework\Exception\LocalizedException $e) {

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function execute()
7777
$attributeSet->setEntityTypeId($this->_entityTypeId)->load($setName, 'attribute_set_name');
7878
if ($attributeSet->getId()) {
7979
$setName = $this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($setName);
80-
$this->messageManager->addError(__('Product Template named \'%1\' already exists.', $setName));
80+
$this->messageManager->addError(__('An attribute set named \'%1\' already exists.', $setName));
8181

8282
$layout = $this->layoutFactory->create();
8383
$layout->initMessages();

dev/tests/api-functional/testsuite/Magento/Catalog/Api/AttributeSetManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function testCreateThrowsExceptionIfAttributeSetWithGivenNameAlreadyExist
156156
$entityTypeCode = 'catalog_product';
157157
$entityType = $this->getEntityTypeByCode($entityTypeCode);
158158
$attributeSetName = 'Default';
159-
$expectedMessage = 'Product template named "Default" already exists.';
159+
$expectedMessage = 'An attribute set "Default" already exists.';
160160

161161
$arguments = [
162162
'attributeSet' => [

dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function processAssert(CatalogProductSetIndex $productSetPage, CatalogAtt
3636
$productSetPage->open();
3737
\PHPUnit_Framework_Assert::assertFalse(
3838
$productSetPage->getGrid()->isRowVisible($filterAttributeSet),
39-
'Product Template named "' . $filterAttributeSet['set_name'] . '" is present in Product Template grid.'
39+
'An attribute set "' . $filterAttributeSet['set_name'] . '" is present in Product Template grid.'
4040
);
4141
}
4242

0 commit comments

Comments
 (0)