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

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

public it_delegates_throwing_method_not_found_exception_for_constructor ( WrappedObject $wrappedObject, ExceptionFactory $exceptions, stdClass $argument )
$wrappedObject PhpSpec\Wrapper\Subject\WrappedObject
$exceptions PhpSpec\Exception\ExceptionFactory
$argument stdClass
    function it_delegates_throwing_method_not_found_exception_for_constructor(WrappedObject $wrappedObject, ExceptionFactory $exceptions, \stdClass $argument)
    {
        $obj = new ExampleClass();
        $wrappedObject->isInstantiated()->willReturn(false);
        $wrappedObject->getInstance()->willReturn(null);
        $wrappedObject->getArguments()->willReturn(array($argument));
        $wrappedObject->getClassName()->willReturn('spec\\PhpSpec\\Wrapper\\Subject\\ExampleClass');
        $wrappedObject->getFactoryMethod()->willReturn(null);
        $exceptions->methodNotFound('spec\\PhpSpec\\Wrapper\\Subject\\ExampleClass', '__construct', array($argument))->willReturn(new \PhpSpec\Exception\Fracture\MethodNotFoundException('Method "__construct" not found.', $obj, '"ExampleClass::__construct"', array()))->shouldBeCalled();
        $this->shouldThrow('\\PhpSpec\\Exception\\Fracture\\MethodNotFoundException')->duringCall('__construct');
    }