spec\Prophecy\Doubler\Generator\Node\ClassNodeSpec::it_throws_an_exception_when_adding_a_method_that_isnt_extendable PHP Method

it_throws_an_exception_when_adding_a_method_that_isnt_extendable() public method

public it_throws_an_exception_when_adding_a_method_that_isnt_extendable ( Prophecy\Doubler\Generator\Node\MethodNode $method )
$method Prophecy\Doubler\Generator\Node\MethodNode
    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);
    }