Skip to content

Commit 0b00389

Browse files
committed
Add testing guidelines
1 parent f5f216a commit 0b00389

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/contributing/development.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
- **Unit tests**: Located in `tests/Unit/`
1414
- **Run all tests**: `composer test`
1515

16+
## Testing Guidelines
17+
18+
1. **Avoid PHPUnit mocks**: Create custom test implementations instead of using createMock()
19+
2. **Test contracts not implementations**: Verify interactions without depending on specific behavior
20+
3. **Make test properties public**: When using anonymous classes to access test state
21+
4. **Verify method calls**: Track whether methods were called and with what parameters
22+
1623
All contributions must include tests that pass.
1724

1825
## Code Style

0 commit comments

Comments
 (0)