Skip to content

Commit 5d7ce3e

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

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function constructorExceptionDataProvider()
7171
require __DIR__ . '/_files/config_data.php',
7272
'non_existing_dir',
7373
'Magento\Framework\Exception\LocalizedException',
74-
"Base directory 'non_existing_dir' does not exist",
74+
new \Magento\Framework\Phrase("Base directory 'non_existing_dir' does not exist"),
7575
],
7676
'invalid scenarios format' => [
7777
require __DIR__ . '/_files/config_data_invalid_scenarios_format.php',

dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/FileFormatTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ public function testRunDelegation()
5959
$this->_object->run($this->_scenario, $reportFile);
6060
}
6161

62-
/**
63-
* @expectedException \Magento\Framework\Exception\LocalizedException
64-
* @expectedExceptionMessage Unable to run scenario 'Scenario', format is not supported.
65-
*/
6662
public function testRunUnsupportedFormat()
6763
{
64+
$this->setExpectedException(
65+
'Magento\Framework\Exception\LocalizedException',
66+
new \Magento\Framework\Phrase("Unable to run scenario '%1', format is not supported", ['Scenario'])
67+
);
6868
$scenario = new \Magento\TestFramework\Performance\Scenario(
6969
'Scenario',
7070
'scenario.txt',

dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/JmeterTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ public function runExceptionDataProvider()
133133
"{$fixtureDir}/scenario_without_report.jmx",
134134
"{$fixtureDir}/scenario_without_report.jtl",
135135
'Magento\Framework\Exception\LocalizedException',
136-
"Report file '{$fixtureDir}/scenario_without_report.jtl' for 'Scenario' has not been created.",
136+
new \Magento\Framework\Phrase(
137+
"Report file '%1/scenario_without_report.jtl' for 'Scenario' has not been created.",
138+
[$fixtureDir]
139+
),
137140
],
138141
'scenario failure in report' => [
139142
"{$fixtureDir}/scenario_failure.jmx",

0 commit comments

Comments
 (0)