Liip\RMT\Context::getParameter PHP Method

getParameter() public method

public getParameter ( $id )
    public function getParameter($id)
    {
        if (!isset($this->params[$id])) {
            throw new \InvalidArgumentException("There is no param defined with id [{$id}]");
        }
        return $this->params[$id];
    }

Usage Example

Example #1
0
 /**
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage There is no param defined with id [abc]
  */
 public function testGetParamWithoutSet()
 {
     $this->context->getParameter('abc');
 }