Skip to content

Commit 38bb428

Browse files
author
Yurii Torbyk
committed
MAGETWO-34991: Eliminate exceptions from the list Part2
1 parent 1b63568 commit 38bb428

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

dev/tests/integration/framework/Magento/TestFramework/Annotation/DataFixture.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ class DataFixture
3232
public function __construct($fixtureBaseDir)
3333
{
3434
if (!is_dir($fixtureBaseDir)) {
35-
throw new \Magento\Framework\Exception\LocalizedException("Fixture base directory '{$fixtureBaseDir}' does not exist.");
35+
throw new \Magento\Framework\Exception\LocalizedException(
36+
new \Magento\Framework\Phrase("Fixture base directory '%1' does not exist.", [$fixtureBaseDir])
37+
);
3638
}
3739
$this->_fixtureBaseDir = realpath($fixtureBaseDir);
3840
}
@@ -116,7 +118,7 @@ protected function _getFixtures(\PHPUnit_Framework_TestCase $test, $scope = null
116118
if (strpos($fixture, '\\') !== false) {
117119
// usage of a single directory separator symbol streamlines search across the source code
118120
throw new \Magento\Framework\Exception\LocalizedException(
119-
'Directory separator "\\" is prohibited in fixture declaration.'
121+
new \Magento\Framework\Phrase('Directory separator "\\" is prohibited in fixture declaration.')
120122
);
121123
}
122124
$fixtureMethod = [get_class($test), $fixture];

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Bootstrap/SettingsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ public function getAsConfigFileExceptionDataProvider()
208208
return [
209209
'non-existing setting' => [
210210
'non_existing',
211-
"Setting 'non_existing' specifies the non-existing file ''.",
211+
__("Setting 'non_existing' specifies the non-existing file ''."),
212212
],
213213
'non-existing file' => [
214214
'item_label',
215-
"Setting 'item_label' specifies the non-existing file '{$this->_fixtureDir}Item Label.dist'.",
215+
__("Setting 'item_label' specifies the non-existing file '%1Item Label.dist'.", $this->_fixtureDir),
216216
]
217217
];
218218
}

0 commit comments

Comments
 (0)