public function config($key, $default = null) { if (isset($this->config[$key])) { return $this->config[$key]; } throw new InvalidArgumentException("Key {$key} is not defined for testing"); }