/** * @expectedException \InvalidArgumentException */ public function testRemoveNonExistentParameterByIndex() { $method = new PhpMethod('doink'); $method->removeParameter(5); }