This does not test anything at all as the logic of the handler is in ``writeZendMonitorCustomEvent``, not in ``write``.

If you really want to test something while avoiding to call zend monitor for real, you should move the logic outside the method meant to be mocked:

```php
protected function writeZendMonitorCustomEvent($level, $message, $data)
{
    return zend_monitor_custom_event($level, $message, $data);
}
```

And you should put some expectation what it receives otherwise you cannot be sure it will get what you want.