File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
app/code/Magento/SampleData/Test/Unit/Console/Command Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ public function testExecuteWithNoUpdate(
140
140
*
141
141
* @return array
142
142
*/
143
- public function processDataProvider ()
143
+ public function processDataProvider (): array
144
144
{
145
145
return [
146
146
'No sample data found ' => [
@@ -195,12 +195,14 @@ public function processDataProvider()
195
195
}
196
196
197
197
/**
198
- * @expectedException Exception
199
- * @expectedExceptionMessage Error in writing Auth file path/to/auth.json. Please check permissions for writing.
200
198
* @return void
201
199
*/
202
- public function testExecuteWithException ()
200
+ public function testExecuteWithException (): void
203
201
{
202
+ $ this ->expectException (Exception::class);
203
+ $ this ->expectExceptionMessage (
204
+ 'Error in writing Auth file path/to/auth.json. Please check permissions for writing. '
205
+ );
204
206
$ this ->directoryReadMock ->expects ($ this ->once ())
205
207
->method ('readFile ' )
206
208
->with ('composer.json ' )
@@ -263,7 +265,7 @@ private function createCommandTester(): CommandTester
263
265
protected function expectedComposerArgumentsSampleDataCommands (
264
266
array $ sampleDataPackages ,
265
267
string $ pathToComposerJson
266
- ) : array {
268
+ ): array {
267
269
return [
268
270
'command ' => 'require ' ,
269
271
'--working-dir ' => $ pathToComposerJson ,
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ public function testExecuteWithNoUpdate(
77
77
*
78
78
* @return array
79
79
*/
80
- public function processDataProvider ()
80
+ public function processDataProvider (): array
81
81
{
82
82
return [
83
83
'No sample data found in require ' => [
You can’t perform that action at this time.
0 commit comments