Skip to content

Commit 380fa9c

Browse files
committed
Fixed code sniffer test
1 parent c695fb9 commit 380fa9c

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

app/code/Magento/Developer/Test/Unit/Console/Command/TablesWhitelistGenerateCommandTest.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
class TablesWhitelistGenerateCommandTest extends TestCase
2424
{
2525
// Exception Messages!
26-
const CONFIG_EXCEPTION = 'Configuration Exception';
27-
const EXCEPTION = 'General Exception';
26+
const CONFIG_EXCEPTION_MESSAGE = 'Configuration Exception Message';
27+
const EXCEPTION_MESSAGE = 'General Exception Message';
2828

2929
/** @var WhitelistGenerator|MockObject $whitelistGenerator */
3030
private $whitelistGenerator;
@@ -75,9 +75,11 @@ public function testCommandFailure(string $arguments, string $expected, $excepti
7575
$this->whitelistGenerator->expects($this->once())
7676
->method('generate')
7777
->with($arguments)
78-
->willReturnCallback(function () use ($exception) {
79-
throw $exception;
80-
});
78+
->willReturnCallback(
79+
function () use ($exception) {
80+
throw $exception;
81+
}
82+
);
8183

8284
$commandTest = $this->execute($arguments);
8385
$this->assertEquals($expected, $commandTest->getStatusCode());
@@ -115,26 +117,26 @@ public function failureDataProvider()
115117
[
116118
'all',
117119
Cli::RETURN_FAILURE,
118-
new ConfigException(__(self::CONFIG_EXCEPTION)),
119-
self::CONFIG_EXCEPTION
120+
new ConfigException(__('Configuration Exception Message')),
121+
self::CONFIG_EXCEPTION_MESSAGE
120122
],
121123
[
122124
'Module_Name',
123125
Cli::RETURN_FAILURE,
124-
new ConfigException(__(self::CONFIG_EXCEPTION)),
125-
self::CONFIG_EXCEPTION
126+
new ConfigException(__('Configuration Exception Message')),
127+
self::CONFIG_EXCEPTION_MESSAGE
126128
],
127129
[
128130
'all',
129131
Cli::RETURN_FAILURE,
130-
new \Exception(self::EXCEPTION),
131-
self::EXCEPTION
132+
new \Exception(self::EXCEPTION_MESSAGE),
133+
self::EXCEPTION_MESSAGE
132134
],
133135
[
134136
'Module_Name',
135137
Cli::RETURN_FAILURE,
136-
new \Exception(self::EXCEPTION),
137-
self::EXCEPTION
138+
new \Exception(self::EXCEPTION_MESSAGE),
139+
self::EXCEPTION_MESSAGE
138140
]
139141
];
140142
}

0 commit comments

Comments
 (0)