'An error logged to the given ``LogPublisher`` is converted to an Eliot
log message.'

@validateLogging(None)
def test_error(self, logger):

    publisher = LogPublisher()
    observer = EliotObserver(publisher)
    observer.logger = logger
    publisher.addObserver(observer)
    publisher.msg(failure=Failure(ZeroDivisionError('onoes')), why='A    zero    division    ono', isError=True)
    message = u'A    zero    division    ono\nTraceback    (most    recent    call    last):\nFailure:    exceptions.ZeroDivisionError:    onoes\n'
    assertHasMessage(self, logger, TWISTED_LOG_MESSAGE, dict(error=True, message=message))
