public function getParam($key) { if (!$this->hasParam($key)) { throw new InvalidException('Param ' . $key . ' does not exist'); } return $this->_params[$key]; }
/** * @group unit * @expectedException \Elastica\Exception\InvalidException */ public function testGetParamInvalid() { $param = new Param(); $param->getParam('notest'); }