[Nostromo] Add more and tweak Tests

This commit is contained in:
Andrés Montañez
2017-01-01 18:20:43 -03:00
parent 616258e91e
commit 3c21cfcce9
16 changed files with 389 additions and 68 deletions
+5 -1
View File
@@ -31,7 +31,7 @@ class Runtime
/**
* @var array Magallanes configuration
*/
protected $configuration;
protected $configuration = [];
/**
* @var string|null Environment being deployed
@@ -214,6 +214,10 @@ class Runtime
*/
public function getEnvironmentConfig($key = null, $default = null)
{
if (!array_key_exists('environments', $this->configuration) || !is_array($this->configuration['environments'])) {
return [];
}
if (!array_key_exists($this->environment, $this->configuration['environments'])) {
return [];
}