[BrowserKit] added getServerParameter method which makes setServerParameters/setServerParameter methods testable
This commit is contained in:
parent
54c3d236c2
commit
1d85a3dcb1
@ -119,6 +119,18 @@ abstract class Client
|
||||
$this->server[$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets single server parameter for specified key.
|
||||
*
|
||||
* @param string $key A key of the parameter to get
|
||||
* @param string $default A default value when key is undefined
|
||||
* @return string A value of the parameter
|
||||
*/
|
||||
public function getServerParameter($key, $default = '')
|
||||
{
|
||||
return (isset($this->server[$key])) ? $this->server[$key] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the History instance.
|
||||
*
|
||||
|
Reference in New Issue
Block a user