Since I strongly disagreewanted more withthan the current expectException
implementation, I made a trait to use on my test cases. It's only 50~50 lines of code.
- Supports multiple exceptions per test
- Supports assertions called after the exception is thrown
- Robust and clear usage examples
- Standard
assert
syntax - Supports assertions for more than just message, code, and class
- Supports inverse assertion,
assertNotThrows
- Supports PHP 7
Throwable
errors