Skip to content

Latest commit

Β 

History

History
30 lines (21 loc) Β· 935 Bytes

File metadata and controls

30 lines (21 loc) Β· 935 Bytes

πŸ§ͺ Testing

Ensure your codebase is robust, reliable, and maintainable by following these core testing practices.

⚑ Test Runner

  • Framework: Use PHPUnit for all tests.

πŸ“ Coverage Guidelines

  • What to Test:
    • Public Interfaces:
      • For libraries: public methods
      • For API backends: API endpoints
      • For modular monoliths: Module Interfaces
  • Coverage:
    • No hard minimums, but strive for meaningful coverage to catch regressions and remove dead code.

🧩 Test Types

  • Feature Tests:
    • Required for all API endpoints and Module API Interface methods.
  • Middleware:
    • If middleware is disabled or bypassed in feature tests, ensure you write dedicated unit tests for it.

πŸ“ Test Syntax

  • Use the #[Test] attribute for all test methods.
  • Naming:
    • Use snake_case for test method names to maximize readability.