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();
}