Skip to content

Commit ae2936e

Browse files
committed
Merge remote-tracking branch 'goinc/MAGETWO-51102' into pr-573
2 parents 16266b0 + f206052 commit ae2936e

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class SampleDataDeployCommand extends Command
3535

3636
/**
3737
* @var ArrayInputFactory
38+
* @deprecated
3839
*/
3940
private $arrayInputFactory;
4041

@@ -88,8 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8889
}
8990
$commonArgs = array_merge(['packages' => $packages], $commonArgs);
9091
$arguments = array_merge(['command' => 'require'], $commonArgs);
91-
/** @var ArrayInput $commandInput */
92-
$commandInput = $this->arrayInputFactory->create(['parameters' => $arguments]);
92+
$commandInput = new ArrayInput($arguments);
9393

9494
/** @var Application $application */
9595
$application = $this->applicationFactory->create();

app/code/Magento/SampleData/Console/Command/SampleDataRemoveCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class SampleDataRemoveCommand extends Command
3434

3535
/**
3636
* @var ArrayInputFactory
37+
* @deprecated
3738
*/
3839
private $arrayInputFactory;
3940

@@ -82,8 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8283
$commonArgs = ['--working-dir' => $baseDir, '--no-interaction' => 1, '--no-progress' => 1];
8384
$packages = array_keys($sampleDataPackages);
8485
$arguments = array_merge(['command' => 'remove', 'packages' => $packages], $commonArgs);
85-
/** @var ArrayInput $commandInput */
86-
$commandInput = $this->arrayInputFactory->create(['parameters' => $arguments]);
86+
$commandInput = new ArrayInput($arguments);
8787

8888
/** @var Application $application */
8989
$application = $this->applicationFactory->create();

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ public function testExecute(array $sampleDataPackages, $appRunResult, $expectedM
3434
->method('getSampleDataPackages')
3535
->willReturn($sampleDataPackages);
3636

37-
$commandInput = $this->getMock('Symfony\Component\Console\Input\ArrayInput', [], [], '', false);
38-
3937
$arrayInputFactory = $this
4038
->getMock('Symfony\Component\Console\Input\ArrayInputFactory', ['create'], [], '', false);
39+
$arrayInputFactory->expects($this->never())->method('create');
4140

4241
array_walk($sampleDataPackages, function (&$v, $k) {
4342
$v = "$k:$v";
@@ -51,10 +50,7 @@ public function testExecute(array $sampleDataPackages, $appRunResult, $expectedM
5150
'--no-progress' => 1,
5251
'packages' => $packages,
5352
];
54-
$arrayInputFactory->expects($this->any())
55-
->method('create')
56-
->with(['parameters' => $requireArgs])
57-
->willReturn($commandInput);
53+
$commandInput = new \Symfony\Component\Console\Input\ArrayInput($requireArgs);
5854

5955
$application = $this->getMock('Composer\Console\Application', [], [], '', false);
6056
$application->expects($this->any())->method('run')

0 commit comments

Comments
 (0)