Files

35 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2017-01-01 03:23:27 -03:00
<?php
2017-01-01 18:20:43 -03:00
/*
* This file is part of the Magallanes package.
*
* (c) Andrés Montañez <andres@andresmontanez.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2017-01-01 03:23:27 -03:00
namespace Mage\Tests\Command\BuiltIn\Config;
use Mage\Command\BuiltIn\Config\EnvironmentsCommand;
use Mage\Command\AbstractCommand;
2017-01-04 21:46:40 -03:00
use Mage\Tests\MageApplicationMockup;
2017-01-01 03:23:27 -03:00
use Symfony\Component\Console\Tester\CommandTester;
use PHPUnit_Framework_TestCase as TestCase;
class EnvironmentsCommandTest extends TestCase
{
public function testConfigDumpTermination()
{
2017-01-29 18:25:02 -03:00
$application = new MageApplicationMockup(__DIR__ . '/../../../Resources/basic.yml');
2017-01-01 03:23:27 -03:00
/** @var AbstractCommand $command */
$command = $application->find('config:environments');
2017-01-04 21:46:40 -03:00
$this->assertTrue($command instanceof EnvironmentsCommand);
2017-01-01 03:23:27 -03:00
$tester = new CommandTester($command);
$tester->execute(['command' => $command->getName()]);
2017-01-01 18:20:43 -03:00
$this->assertEquals(0, $tester->getStatusCode());
2017-01-01 03:23:27 -03:00
}
}