Skip to content

Testing Conventions Overview

This directory contains testing conventions for the IxDF project. Our testing approach emphasizes reliability, maintainability, and comprehensive coverage without over-testing.

Key Principles

  1. Test Doubles Over Mocks: Prefer test doubles for better maintainability
  2. Strict Types: Use strict PHP types and advanced Psalm/PHPStan annotations
  3. Arrange-Act-Assert: Structure tests clearly
  4. Meaningful Coverage: Focus on business-critical paths
  5. Fast Feedback: Optimize test suite performance

Tools and Frameworks

  • PHPUnit for unit and integration tests
  • Pest PHP for expressive testing
  • Laravel Dusk for browser testing
  • Cypress for E2E testing
  • PHPStan and Psalm for static analysis

Test Organization

text
tests/
├── Unit/              # Unit tests
├── Integration/       # Integration tests
├── Feature/          # Feature tests
├── Browser/          # Browser tests
└── TestCase.php      # Base test case

Additional Resources