Graby\Graby::getConfig PHP Method

getConfig() public method

Return a config.
public getConfig ( string $key ) : mixed
$key string
return mixed
    public function getConfig($key)
    {
        if (!isset($this->config[$key])) {
            throw new \Exception(sprintf('No config found for key: "%s"', $key));
        }
        return $this->config[$key];
    }

Usage Example

Beispiel #1
0
 /**
  * @dataProvider dataForConfigOverride
  */
 public function testConfigOverride($key, $config)
 {
     $graby = new Graby($config);
     $this->assertEquals($config[$key], $graby->getConfig($key));
 }