PHPUnit
PHPUnit techniques and strategies for writing better tests, from testing traits and callback assertions to working with PSR-20 clocks.
PSR-20 Clocks: Testable Time in PHP
Category: PHPUnit
Learn how a ClockInterface helps you decouple time and write stable, testable code.
Stop mocking about: Event Dispatcher
Category: PHPUnit
How to replace your mocked event dispatchers with a real one, and why.
Validate method parameters using callbacks in PHPUnit
Category: PHPUnit
Save yourself from (re)creating difficult objects for simple assertions.
Testing Traits in PHPUnit
Category: PHPUnit
Composition over inheritance by using traits; but how can you test these traits in more complex use cases?