spec\PhpSpec\Wrapper\Subject\CallerSpec::it_delegates_throwing_method_not_found_exception PHP Метод

it_delegates_throwing_method_not_found_exception() публичный Метод

public it_delegates_throwing_method_not_found_exception ( WrappedObject $wrappedObject, ExceptionFactory $exceptions )
$wrappedObject PhpSpec\Wrapper\Subject\WrappedObject
$exceptions PhpSpec\Exception\ExceptionFactory
    function it_delegates_throwing_method_not_found_exception(WrappedObject $wrappedObject, ExceptionFactory $exceptions)
    {
        $obj = new \ArrayObject();
        $wrappedObject->isInstantiated()->willReturn(true);
        $wrappedObject->getInstance()->willReturn($obj);
        $wrappedObject->getClassName()->willReturn('ArrayObject');
        $exceptions->methodNotFound('ArrayObject', 'foo', array())->willReturn(new \PhpSpec\Exception\Fracture\MethodNotFoundException('Method "foo" not found.', $obj, '"ArrayObject::foo"', array()))->shouldBeCalled();
        $this->shouldThrow('\\PhpSpec\\Exception\\Fracture\\MethodNotFoundException')->duringCall('foo');
    }