public function get($name, $default = null) { if ($this->values->has($name)) { if ($this->isClosure($this->values[$name])) { $value = $this->values[$name] = call_user_func($this->values[$name]); } else { $value = $this->values[$name]; } } else { $config = Deployer::get()->config; if (isset($config[$name])) { if ($this->isClosure($config[$name])) { $value = $this->values[$name] = call_user_func($config[$name]); } else { $value = $this->values[$name] = $config[$name]; } } else { if (null === $default) { throw new \RuntimeException("Configuration parameter `{$name}` does not exists."); } else { $value = $default; } } } return $this->parse($value); }
public function testDownloadDirectory() { $this->_server->expects($this->once())->method('download')->with($this->_env->get("local_path"), $this->_env->get("remote_path")); download('{{local_path}}', '{{remote_path}}'); }