spec\PhpSpec\Wrapper\Subject\WrappedObjectSpec::it_throws_an_exception_when_factory_method_returns_a_non_object PHP Метод

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

    function it_throws_an_exception_when_factory_method_returns_a_non_object()
    {
        $this->callOnWrappedObject('beAnInstanceOf', array('\\DateTimeZone'));
        $this->callOnWrappedObject('beConstructedThrough', array('listAbbreviations'));
        $message = 'The method \\DateTimeZone::listAbbreviations did not return an object, returned array instead';
        $this->shouldThrow(new FactoryDoesNotReturnObjectException($message))->duringInstantiate();
    }