zenstruck/assert
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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| zenstruck/callback | 0.84 | Tiny PHP utility for building and composing callbacks/closures with a fluent API. Helps wrap callables, bind arguments, decorate or chain behavior, and safely invoke functions and methods—handy for middleware-style pipelines, event hooks, and reusable functional helpers. | 56 | 56 | 1 | 210K | 0 | 2.7 | 49.3 | MIT | 4 years ago | |
| zenstruck/mailer-test | 0.84 | Opinionated helpers to test emails sent with symfony/mailer. Use InteractsWithMailer in KernelTestCase/WebTestCase for fluent assertions like assertNoEmailSent, assertSentEmailCount, and inspect messages with TestEmail (subject, recipients, body, attachments). | 46 | 46 | 5 | 51K | 4 | 9.2 | 44.4 | MIT | 9 months ago | |
| zenstruck/console-test | 0.84 | Test your Symfony Console commands with ease. zenstruck/console-test provides a lightweight harness to run commands, feed input, capture output, and assert exit codes and messages—ideal for fast, reliable unit/integration tests without booting full apps. | 57 | 57 | 8 | 28K | 2 | 10.8 | 38.9 | MIT | 11 months ago | |
| zenstruck/dom | 0.84 | Zenstruck DOM is a tiny PHP/Laravel-friendly library for working with HTML/XML DOM. It offers a simple, fluent API to query, traverse, and manipulate nodes, making scraping, testing, and HTML transformations easier than using raw DOMDocument/DOMXPath. | 5 | 5 | 3 | 1K | 0 | 0.1 | 30.9 | MIT | — | |
| zenstruck/browser | 0.84 | zenstruck/browser is an expressive, fluent wrapper around Symfony's functional testing features, letting you visit pages, assert content, fill fields, and click buttons in chainable code. Pair it with zenstruck/foundry for succinct, readable tests. | 230 | 229 | 27 | 165K | 28 | 39.6 | 57.2 | MIT | 3 weeks ago | |
| zenstruck/foundry | 0.84 | Foundry makes fixture creation enjoyable with an expressive, auto-completable, on-demand factory system for Symfony and Doctrine. Create and persist objects with minimal data, use factories in DoctrineFixturesBundle or tests, and support ORM, MongoDB ODM, or both. | 804 | 801 | 115 | 596K | 21 | 47.0 | 57.4 | MIT | 1 week ago | |
| jasonmccreary/laravel-test-assertions | 0.83 | Adds a trait of extra PHPUnit assertions for Laravel testing. Confirm controllers/actions and named routes use specific FormRequest validation or middleware, compare validation rules (subset or exact), check rule instances, and assert view data is explicitly null. | 349 | 351 | 38 | 140K | 2 | 17.5 | 38.6 | — | 7 months ago | |
| phpstan/phpstan-webmozart-assert | 0.83 | PHPStan extension for webmozart/assert that teaches PHPStan how Assert::* calls narrow types. Supports many assertions (including nullOr*/all*) so values become non-null, specific scalars, instances, arrays, etc. after validation, improving static analysis accuracy. | 185 | 185 | 33 | 639K | 5 | 12.3 | 50.1 | MIT | 1 year ago | |
| zenstruck/messenger-test | 0.83 | TestTransport for symfony/messenger that intercepts queued messages so you can inspect and assert against them in your tests. Sent messages are serialized and unserialized as a check, and the transport can also process queued messages. Use the InteractsWithMessenger trait to assert queue state, mess... | 279 | 279 | 15 | 403K | 2 | 31.3 | 51.1 | MIT | 1 week ago | |
| zenstruck/bytes | 0.83 | Small PHP bytes utility for working with file sizes: parse human-readable strings (e.g. "10 MB"), format byte counts, compare values, and convert between units. Handy for Laravel/PHP apps needing consistent size handling and validation. | 25 | 25 | 3 | 90K | 0 | 4.2 | 50.1 | MIT | 11 months ago | |
| testo/assert | 0.83 | Assertion plugin for the Testo PHP testing framework. Adds a fluent assert/expect facade, expectation lifecycle, and helpers for matching thrown exceptions. Reports comparisons through Testo’s standard pipeline. Install via Composer: testo/assert. | 0 | 0 | 0 | 16K | 0 | 0.0 | 55.3 | — | — | |
| codeception/verify | 0.82 | Tiny BDD-style assertion wrapper for PHPUnit/Codeception. Use verify() and Verify::Array/Callable for readable, chainable expectations like equals, contains, greater/less, true/false/null, empty/notEmpty, throws/doesNotThrow—closer to natural language. | 146 | 149 | 26 | 172K | 1 | 15.2 | 44.8 | MIT | 8 months ago | |
| draw/data-tester | 0.82 | Lightweight PHP data testing helper for validating arrays/objects against expected shapes and values. Useful for unit tests and quick assertions, with simple matchers and readable failure messages to spot mismatches fast. | 0 | 0 | 0 | 0 | 0 | 0.6 | — | MIT | 9 years ago | |
| lastdragon-ru/lara-asp-testing | 0.82 | Testing utilities for integrating Lara ASP into Laravel apps. Provides helpers, fakes, and assertions to simplify writing automated tests around ASP policies, decisions, and request/response flows in your application. | 0 | 0 | 0 | 75 | 0 | 0.0 | 26.0 | MIT | — | |
| zenstruck/console-extra | 0.82 | Modular helpers to reduce boilerplate in Symfony console commands. Build invokable commands with auto-injected IO, arguments/options via attributes, and handy traits to run other commands or processes. Designed to mix and match features or power a shared base command. | 80 | 80 | 3 | 2K | 11 | 15.0 | 23.4 | MIT | 11 months ago | |
| phpunit/phpunit-dom-assertions | 0.82 | Adds expressive DOM assertions to PHPUnit for testing HTML and XML output, letting you assert elements, attributes, text content, and structure using a fluent, readable API built on Symfony's DomCrawler and CssSelector components. | 29 | — | 13 | — | 1 | 6.3 | — | NOASSERTION | 8 months ago |
|
| atournayre/assert | 0.82 | — | 0 | 0 | 0 | 13 | 1 | 1.3 | 15.8 | MIT | 3 years ago | |
| simplesamlphp/assert | 0.82 | A fork of webmozart/assert that lets every assertion throw a custom exception via an extra parameter, falling back to AssertionFailedException. It also adds XML/SAML2-specific assertions for SimpleSAMLphp projects. | 7 | 7 | 3 | 279K | 0 | 15.2 | 62.3 | LGPL-2.1 | 3 months ago | |
| phpstan/phpstan-beberlei-assert | 0.82 | PHPStan extension for beberlei/assert. Adds improved static analysis and type inference for Assert::that and related assertions, helping PHPStan understand refined types after checks and reducing false positives in codebases using beberlei/assert. | 43 | 44 | 16 | 131K | 3 | 6.2 | 48.2 | MIT | 1 year ago | |
| bovigo/assert | 0.82 | 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+. | 13 | 13 | 5 | 724 | 1 | 11.5 | 24.9 | BSD-3-Clause | 11 months ago |
How can I help you explore Laravel packages today?