bovigo/assert
Functional-style assertions for PHP unit tests. Use assertThat(value, predicate[, description]) for readable checks with helpful failure messages. Integrates with PHPUnit via AssertionFailure extending AssertionFailedError. Requires PHP 8.3+.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| zenstruck/assert | 0.83 | Lightweight PHP assertion helpers for cleaner, safer code. zenstruck/assert provides expressive, fluent assertions and value validation with helpful exception messages, improving readability in libraries and Laravel apps without bringing a full testing framework. | 81 | 81 | 5 | 720K | 0 | 25.0 | 64.5 | MIT | 4 months ago | |
| webmozart/assert | 0.82 | webmozart/assert is a lightweight PHP assertion library for validating method input/output. It provides many type and value checks via a single Assert class and throws InvalidArgumentException with consistent, readable default error messages (or custom ones). | 7,647 | 7,722 | 158 | 11M | 25 | 64.9 | 62.1 | MIT | 1 month ago | |
| codeception/lib-asserts | 0.82 | Lightweight assertion library used by Codeception. Provides clear, dependency-free assert helpers for writing expressive tests in PHP, with informative failure messages and easy integration into any PHPUnit-style workflow. | 104 | 104 | 5 | 1M | 1 | 26.5 | 65.0 | MIT | 2 months ago | |
| beberlei/assert | 0.80 | Lightweight assertion library for validating method arguments and input data in PHP. Provides a fluent, readable API with many built-in rules (string, numeric, email, UUID, collection, etc.), clear exceptions, and easy extensibility for custom constraints. | 2,428 | 2,459 | 186 | 2M | 29 | 57.1 | 65.9 | NOASSERTION | 1 year ago | |
| carthage-software/mago | 0.80 | Mago is an extremely fast PHP linter, formatter, and static analyzer written in Rust. It brings Rust-inspired speed and reliability to PHP projects with a modern toolchain and great developer experience, plus multiple install options (script, Homebrew, Composer). | 2,992 | 2,993 | 144 | 115K | 84 | 71.6 | 55.8 | Apache-2.0 | 1 day ago | |
| mehr-als-nix/assumptions | 0.78 | Assumptions for PHPUnit: skip tests when preconditions aren’t met (PHP version, extensions, etc.). Provides assumeTrue/assumeThat and Hamcrest matchers; failed assumptions are treated as skipped, including in @before/@beforeClass. Similar to @requires. | 2 | 3 | 2 | 0 | 0 | 22.2 | — | MIT | 8 years ago | |
| codeception/module-asserts | 0.78 | Codeception Asserts module adds rich assertion helpers for your tests, letting you use a wide set of PHPUnit-style assertions directly in Codeception suites. Ideal for unit, functional, and acceptance tests to keep checks readable and failures clear. | 85 | 86 | 10 | 1M | 0 | 25.0 | 65.0 | MIT | 3 months ago | |
| bovigo/callmap | 0.78 | Stub and mock PHP method and function calls via a callmap. Define fixed returns, callbacks, consecutive results, or thrown exceptions, then verify invocations and arguments. Works with any unit test framework; argument checks via bovigo/assert or PHPUnit. | 8 | 8 | 4 | 464 | 0 | 29.3 | 28.0 | BSD-3-Clause | 4 months ago | |
| hamcrest/hamcrest-php | 0.76 | Official PHP port of Hamcrest matchers for expressive assertions in tests. Use MatcherAssert::assertThat() or convenient global functions (assertThat, equalTo, is, both/andAlso, either/orElse) to build readable, composable matchers with PHP-friendly typing. | 7,066 | 7,091 | 46 | 9M | 10 | 51.5 | 56.0 | NOASSERTION | 11 months ago |
How can I help you explore Laravel packages today?