Webmozart Assert
Assertions to validate method input/output with nice error messages
...This library is heavily inspired by Benjamin Eberlei's wonderful assert package, but fixes a usability issue with error messages that can't be fixed there without breaking backwards compatibility. This package features usable error messages by default. However, you can also easily write custom error messages. In beberlei/assert, the ordering of the %s placeholders is different for every assertion. This package, on the contrary, provides consistent placeholder ordering for all assertions. Check the source code of the assertions to find out details about the additional available placeholders. The Assert class comes with a few methods, which can be overridden to change the class behaviour. ...