spec\PhpSpec\Wrapper\Subject\CallerSpec::it_delegates_throwing_method_not_visible_exception PHP Method

it_delegates_throwing_method_not_visible_exception() public method

public it_delegates_throwing_method_not_visible_exception ( WrappedObject $wrappedObject, ExceptionFactory $exceptions )
$wrappedObject PhpSpec\Wrapper\Subject\WrappedObject
$exceptions PhpSpec\Exception\ExceptionFactory
    function it_delegates_throwing_method_not_visible_exception(WrappedObject $wrappedObject, ExceptionFactory $exceptions)
    {
        $obj = new ExampleClass();
        $wrappedObject->isInstantiated()->willReturn(true);
        $wrappedObject->getInstance()->willReturn($obj);
        $wrappedObject->getClassName()->willReturn('spec\\PhpSpec\\Wrapper\\Subject\\ExampleClass');
        $exceptions->methodNotVisible('spec\\PhpSpec\\Wrapper\\Subject\\ExampleClass', 'privateMethod', array())->willReturn(new \PhpSpec\Exception\Fracture\MethodNotVisibleException('Method "privateMethod" not visible.', $obj, '"ExampleClass::privateMethod"', array()))->shouldBeCalled();
        $this->shouldThrow('\\PhpSpec\\Exception\\Fracture\\MethodNotVisibleException')->duringCall('privateMethod');
    }