Example #1
0
 /**
  * @covers ::run
  * @covers ::listEnvironments
  * @dataProvider listEnvironmentsProvider
  */
 public function testListEnvironment($environmentFiles, $expectedOutput, $expectedExitCode)
 {
     $this->expectOutputString($expectedOutput);
     $this->scandirValueObj->setValue($environmentFiles);
     $this->mockInputArgument('environments');
     $actualExitCode = $this->listCommand->run();
     $this->assertEquals($expectedExitCode, $actualExitCode);
 }
 /**
  * @covers ::__construct
  * @covers ::run
  */
 public function testRunWhenPharReadonlyEnabled()
 {
     $expectedOutput = "\tThe php.ini variable phar.readonly must be Off.\n\n";
     $expectedExitCode = 200;
     $this->expectOutputString($expectedOutput);
     $this->iniGetValue->setValue(true);
     $compilerMock = $this->getMock('Mage\\Compiler');
     $compileCommand = new CompileCommand($compilerMock);
     $actualExitCode = $compileCommand->run();
     $this->assertEquals($expectedExitCode, $actualExitCode);
 }