/** * @expectedException \InvalidArgumentException */ public function testReplaceNonExistentParameterByIndex() { $method = new PhpMethod('doink'); $method->replaceParameter(5, new PhpParameter()); }