Skip to content

test(handlers): Add tests for error handlers (API, CLI, HTTP) #287

@usernane

Description

@usernane

File

Handlers/APICallErrHandler.php, Handlers/CLIErrHandler.php, Handlers/HTTPErrHandler.php

Current Coverage

0% (0/85 combined)

Scenarios to Cover

  • APICallErrHandler: outputs correct JSON error response on exception
  • APICallErrHandler: handles different HTTP error codes
  • CLIErrHandler: outputs formatted error to CLI on exception
  • CLIErrHandler: handles fatal errors
  • HTTPErrHandler: renders correct HTTP error page
  • HTTPErrHandler: handles 404, 500 codes

Notes

All three handlers are at 0%. These are the last line of defense — untested means unknown behavior when things go wrong in production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTest coverage tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions