'E_ERROR']); $errorHandler->handle($suiteEvent); //Satisfying The Premature Exit Handling $errorHandler->onFinish($suiteEvent); Notification::all(); //clear the messages $errorHandler->errorHandler(E_USER_DEPRECATED, 'deprecated message', __FILE__, __LINE__, []); $this->assertEquals([], Notification::all(), 'Deprecation message was added to notifications'); } }