[Nostromo] Improve test coverage

This commit is contained in:
Andrés Montañez
2017-01-07 02:04:36 -03:00
parent 238777cb41
commit 6d708c35fa
11 changed files with 73 additions and 9 deletions
@@ -132,4 +132,20 @@ class DeployCommandWithReleasesTest extends TestCase
$this->assertContains('Copying files with TarGZ ... FAIL', $tester->getDisplay());
$this->assertNotEquals(0, $tester->getStatusCode());
}
public function testDeploymentWithoutReleasesForceRelease()
{
$application = new MageApplicationMockup();
$application->configure(__DIR__ . '/../../Resources/testhost-force-release.yml');
/** @var AbstractCommand $command */
$command = $application->find('deploy');
$this->assertTrue($command instanceof DeployCommand);
$tester = new CommandTester($command);
$tester->execute(['command' => $command->getName(), 'environment' => 'test']);
$this->assertContains('This task is only available with releases enabled', $tester->getDisplay());
$this->assertNotEquals(0, $tester->getStatusCode());
}
}