public function testParseEnv()
{
/* setup */
$dbUrl = getenv('DB_URL');
putenv('DB_URL=mysql://root:[email protected]/test');
$this->_config->init(Stream::url('root/config.php'));
$this->_request->setServer('argv', ['console.php', 'config', 'parse', '--db-url', 'DB_URL', '--db-env']);
$configCommand = new Command\Config($this->_registry, $this->_request, $this->_config);
/* restore */
if ($dbUrl) {
putenv('DB_URL=' . $dbUrl);
}
/* actual */
$actual = $configCommand->run('cli');
/* compare */
$this->assertTrue($actual);
}