mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-17 21:15:04 +02:00
47 lines
969 B
PHP
47 lines
969 B
PHP
<?php
|
|
|
|
namespace MageTest\Command;
|
|
|
|
use Mage\Config;
|
|
use PHPUnit_Framework_TestCase;
|
|
|
|
/**
|
|
* @group Mage_Config
|
|
*/
|
|
class ConfigTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
public function testOverrideDeploymentOptionWithEnvironemntVariable()
|
|
{
|
|
$config = new Config();
|
|
|
|
$expected = 'b';
|
|
$actual = $config->deployment('a', 'b');
|
|
|
|
$this->assertSame($expected, $actual);
|
|
|
|
putenv('MAGE_DEPLOYMENT_A=c');
|
|
|
|
$expected = 'c';
|
|
$actual = $config->deployment('a', 'b');
|
|
|
|
$this->assertSame($expected, $actual);
|
|
}
|
|
|
|
public function testOverrideReleaseOptionWithEnvironemntVariable()
|
|
{
|
|
$config = new Config();
|
|
|
|
$expected = 'b';
|
|
$actual = $config->release('a', 'b');
|
|
|
|
$this->assertSame($expected, $actual);
|
|
|
|
putenv('MAGE_RELEASE_A=c');
|
|
|
|
$expected = 'c';
|
|
$actual = $config->release('a', 'b');
|
|
|
|
$this->assertSame($expected, $actual);
|
|
}
|
|
}
|