Appearance
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
- Test Doubles Over Mocks: Prefer test doubles for better maintainability
- Strict Types: Use strict PHP types and advanced Psalm/PHPStan annotations
- Arrange-Act-Assert: Structure tests clearly
- Meaningful Coverage: Focus on business-critical paths
- 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