Skip to content

Commit 6da2200

Browse files
author
Sergey Semenov
committed
Merge remote-tracking branch 'origin/MAGETWO-49308' into BUGS
2 parents d05b3bf + bfd791b commit 6da2200

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

app/code/Magento/Ui/Model/Manager.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,7 @@ public function prepareData($name)
155155
{
156156
if ($name === null || $this->hasData($name)) {
157157
throw new LocalizedException(
158-
new \Magento\Framework\Phrase(
159-
'Initialization error component, check the '
160-
. 'spelling of the name or the correctness of the call.'
161-
)
158+
new \Magento\Framework\Phrase("Invalid UI Component element name: '%1'", [$name])
162159
);
163160
}
164161
$this->componentsPool = $this->arrayObjectFactory->create();

app/code/Magento/Ui/Test/Unit/Model/ManagerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ public function testGetReader()
126126
$this->assertEquals($this->uiReader, $this->manager->getReader('some_name'));
127127
}
128128

129-
public function testPrepareDataWithException()
129+
public function testPrepareDataWithoutName()
130130
{
131131
$this->setExpectedException(
132132
'Magento\Framework\Exception\LocalizedException',
133-
__('Initialization error component, check the spelling of the name or the correctness of the call.')
133+
__("Invalid UI Component element name: ''")
134134
);
135135
$this->manager->prepareData(null);
136136
}

0 commit comments

Comments
 (0)