OK, when i change the write method to this:

    protected function write(array $record)
    {
        if ($this->isZendServer()) {
            $this->writeZendMonitorCustomEvent($this->levelMap[$record['level']], $record['formatted']);
        }
    }

i will have a problem with my test because Monolog\TestCase does not provide a formatted message. The formatted message is created my AbstractProcessingHandler::handle. But this gets called AFTER i tell the mock what to expect.