function it_throws_an_exception_when_adding_a_method_that_isnt_extendable(MethodNode $method)
{
$this->addUnextendableMethod('testMethod');
$method->getName()->willReturn('testMethod');
$expectedException = new MethodNotExtendableException("Method `testMethod` is not extendable, so can not be added.", "stdClass", "testMethod");
$this->shouldThrow($expectedException)->duringAddMethod($method);
}