Skip to content

Commit 2bfb191

Browse files
andrewbessAndrii Beziazychnyi
authored and
Andrii Beziazychnyi
committed
Fixed tests according to request from issue-27500
1 parent a17f104 commit 2bfb191

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

app/code/Magento/SampleData/Test/Unit/Console/Command/SampleDataDeployCommandTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function testExecuteWithNoUpdate(
140140
*
141141
* @return array
142142
*/
143-
public function processDataProvider()
143+
public function processDataProvider(): array
144144
{
145145
return [
146146
'No sample data found' => [
@@ -195,12 +195,14 @@ public function processDataProvider()
195195
}
196196

197197
/**
198-
* @expectedException Exception
199-
* @expectedExceptionMessage Error in writing Auth file path/to/auth.json. Please check permissions for writing.
200198
* @return void
201199
*/
202-
public function testExecuteWithException()
200+
public function testExecuteWithException(): void
203201
{
202+
$this->expectException(Exception::class);
203+
$this->expectExceptionMessage(
204+
'Error in writing Auth file path/to/auth.json. Please check permissions for writing.'
205+
);
204206
$this->directoryReadMock->expects($this->once())
205207
->method('readFile')
206208
->with('composer.json')
@@ -263,7 +265,7 @@ private function createCommandTester(): CommandTester
263265
protected function expectedComposerArgumentsSampleDataCommands(
264266
array $sampleDataPackages,
265267
string $pathToComposerJson
266-
) : array {
268+
): array {
267269
return [
268270
'command' => 'require',
269271
'--working-dir' => $pathToComposerJson,

app/code/Magento/SampleData/Test/Unit/Console/Command/SampleDataRemoveCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function testExecuteWithNoUpdate(
7777
*
7878
* @return array
7979
*/
80-
public function processDataProvider()
80+
public function processDataProvider(): array
8181
{
8282
return [
8383
'No sample data found in require' => [

0 commit comments

Comments
 (0)