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