|
|
@ -26,11 +26,6 @@ class ListCommandTest extends BaseTest |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $listCommand; |
|
|
|
private $listCommand; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @var Mock |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private $scandirMock; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var FixedValueFunction |
|
|
|
* @var FixedValueFunction |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -45,12 +40,12 @@ class ListCommandTest extends BaseTest |
|
|
|
|
|
|
|
|
|
|
|
$this->scandirValueObj = new FixedValueFunction(); |
|
|
|
$this->scandirValueObj = new FixedValueFunction(); |
|
|
|
$mockBuilder = new MockBuilder(); |
|
|
|
$mockBuilder = new MockBuilder(); |
|
|
|
$this->scandirMock = $mockBuilder->setNamespace('Mage\Command\BuiltIn') |
|
|
|
$scandirMock = $mockBuilder->setNamespace('Mage\Command\BuiltIn') |
|
|
|
->setName("scandir") |
|
|
|
->setName("scandir") |
|
|
|
->setCallableProvider($this->scandirValueObj) |
|
|
|
->setCallableProvider($this->scandirValueObj) |
|
|
|
->build(); |
|
|
|
->build(); |
|
|
|
$this->scandirMock->disable(); |
|
|
|
$scandirMock->disable(); |
|
|
|
$this->scandirMock->enable(); |
|
|
|
$scandirMock->enable(); |
|
|
|
|
|
|
|
|
|
|
|
$this->setUpConsoleStatics(); |
|
|
|
$this->setUpConsoleStatics(); |
|
|
|
} |
|
|
|
} |
|
|
@ -128,6 +123,11 @@ class ListCommandTest extends BaseTest |
|
|
|
$this->assertEquals($expectedExitCode, $actualExitCode); |
|
|
|
$this->assertEquals($expectedExitCode, $actualExitCode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Stub Config::getArgument to return desired value |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param String $argumentValue Input argument |
|
|
|
|
|
|
|
*/ |
|
|
|
private function mockInputArgument($argumentValue) |
|
|
|
private function mockInputArgument($argumentValue) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$configMock = $this->getMock('Mage\Config'); |
|
|
|
$configMock = $this->getMock('Mage\Config'); |
|
|
|