This library contains efficient assertions to test the input and output of your methods. With these assertions, you can greatly reduce the amount of coding needed to write a safe implementation. 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. You can also extend it to add your own assertions.

Features

  • String Assertions
  • File Assertions
  • Object Assertions
  • Static analysis support
  • This library contains efficient assertions to test the input and output of your method
  • You can greatly reduce the amount of coding needed to write a safe implementation

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Webmozart Assert

Webmozart Assert Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Webmozart Assert!

Additional Project Details

Programming Language

PHP

Related Categories

PHP User Interface (UI) Software

Registered

2023-03-16