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

it_delegates_throwing_calling_method_on_non_object_exception() public method

public it_delegates_throwing_calling_method_on_non_object_exception ( ExceptionFactory $exceptions )
$exceptions PhpSpec\Exception\ExceptionFactory
    function it_delegates_throwing_calling_method_on_non_object_exception(ExceptionFactory $exceptions)
    {
        $exceptions->callingMethodOnNonObject('foo')->willReturn(new \PhpSpec\Exception\Wrapper\SubjectException('Call to a member function "foo()" on a non-object.'))->shouldBeCalled();
        $this->shouldThrow('\\PhpSpec\\Exception\\Wrapper\\SubjectException')->duringCall('foo');
    }