vladahejda/phpunit-assert-exception
A PHPUnit helper that adds an assertException() assertion for testing exceptions thrown inside callbacks. Specify the expected exception class, message, and code in one concise call, reducing boilerplate and making exception tests clearer in PHP projects.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| jchook/phpunit-assert-throws | 0.87 | A PHPUnit assertion helper for testing that code throws exceptions. It adds assertThrows to verify exception types and messages in a single call, keeping tests compact and readable while confirming the expected error is actually raised. | 11 | — | 3 | — | 0 | 0.1 | — | MIT | — |
|
| k2gl/phpunit-fluent-assertions | 0.86 | A PHPUnit extension that adds fluent, chainable assertions to your tests, making expectations more readable and expressive while reducing verbose assertion code and keeping familiar PHPUnit workflows. | 2 | 2 | 0 | 586 | 0 | 17.3 | 36.4 | MIT | 1 month ago | |
| bovigo/assert | 0.86 | 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 | |
| codeception/assert-throws | 0.86 | Assert that a callable throws the expected exception without try/catch boilerplate. codeception/assert-throws adds assertThrows and assertDoesNotThrow helpers for Codeception and PHPUnit tests, with clear failure messages and optional checks on exception class and message. | 19 | 19 | 11 | 26K | 1 | 15.8 | 47.6 | MIT | 5 months ago | |
| gecko-packages/gecko-php-unit | 0.86 | Gecko PHP Unit extends PHPUnit with fluent helpers and assertions for testing Laravel applications. It streamlines common tasks like database, HTTP, and file checks, cutting boilerplate so your test suites stay cleaner, more readable, and easier to maintain. | 136 | 136 | 4 | 9K | 0 | 0.9 | 25.2 | MIT | 8 years ago | |
| crodas/phpunit-compat | 0.86 | A PHPUnit compatibility package that helps bridge version differences, making test suites easier to run across varied PHPUnit environments with fewer compatibility issues. | 0 | 0 | 0 | 15 | 0 | 0.0 | 16.6 | — | — | |
| testo/assert | 0.86 | 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 | — | — | |
| herrera-io/phpunit-test-case | 0.86 | PHPUnit TestCase class and Extras trait that add helpers for common test chores: create/delete temporary files and directories, call protected/private methods, and get/set protected/private properties. Use as a base class or mix into your own test case. | 1 | 1 | 0 | 32 | 0 | 0.0 | 12.0 | MIT | — | |
| phpunit/phpunit-mock-objects | 0.86 | Default mock object library for PHPUnit. Create test doubles (mocks, stubs, spies) to isolate units under test, define expectations, control method returns, and verify interactions. Designed for PHPUnit projects and compatible with PHP 7.1+. | 4,920 | 5,056 | 151 | 759K | 0 | 15.2 | 21.4 | NOASSERTION | 13 years ago | |
| marcin-orlowski/phpunit-extra-asserts | 0.86 | A collection of extra assertions for PHPUnit that helps make test suites more expressive and readable. Add clearer, reusable checks for common test scenarios, reduce custom assertion code, and get more informative failures in PHPUnit-based projects. | 3 | 3 | 0 | 623 | 0 | 0.0 | 30.3 | MIT | 2 years ago | |
| behat/phpunit-assertions-extension | 0.85 | Behat extension that brings PHPUnit assertions into Behat step definitions, letting you use assertSame, assertTrue, and other familiar assertions in scenarios for clearer, more expressive test failures. | 1 | 1 | 0 | 2K | 1 | 18.0 | 49.5 | MIT | 1 month ago | |
| phpspec/prophecy-phpunit | 0.85 | Integrates the Prophecy mocking library with PHPUnit for simpler, cleaner test doubles. Install via Composer and use the ProphecyTrait to call prophesize() inside your TestCase, set method predictions/returns, and reveal mocks for injection. | 195 | 195 | 39 | 1M | 1 | 11.7 | 56.7 | MIT | 8 months ago | |
| phpunit/phpunit-dom-assertions | 0.85 | 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 |
|
| padraic/phpunit-extensions | 0.85 | A collection of extensions and helpers for PHPUnit by Padraic Brady, offering convenience assertions, mock utilities, and testing shortcuts that reduce boilerplate and help you write cleaner, more maintainable PHP unit tests. | 17 | 17 | 4 | 353 | 0 | 0.1 | 12.8 | BSD-3-Clause | 9 years ago | |
| jasonmccreary/laravel-test-assertions | 0.85 | 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 | |
| way/phpunit-wrappers | 0.85 | way/phpunit-wrappers provides lightweight PHPUnit wrapper utilities for Laravel and PHP projects, helping you write cleaner, more readable tests with less boilerplate. Use it to simplify assertions, test setup, and common testing patterns without changing your existing PHPUnit workflow. | 45 | 47 | 2 | 66 | 0 | 0.3 | 5.3 | — | — | |
| helmich/phpunit-json-assert | 0.85 | Adds concise JSON assertions to PHPUnit using JSONPath expressions and JSON Schema validation. Use the JsonAssertions trait to verify complex JSON/data structures with readable assert* helpers. Install via Composer and choose the branch matching your PHPUnit/PHP version. | 130 | 130 | 27 | 92K | 3 | 10.8 | 42.3 | MIT | 8 months ago | |
| codeception/module-asserts | 0.84 | 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. | 86 | 87 | 10 | 1M | 0 | 13.4 | 59.3 | MIT | 10 months ago | |
| webmozart/assert | 0.84 | Webmozart Assert provides efficient PHP assertions for method input and output, throwing Webmozart\Assert\InvalidArgumentException on failure. It reduces validation boilerplate and supports clear custom error messages with consistent placeholders. | 7,649 | 7,721 | 168 | 18M | 23 | 64.9 | 65.2 | MIT | 1 month ago | |
| beberlei/assert | 0.83 | A simple PHP library of assertions and guard methods for fast, low-level input validation in business models, libraries, and application code. Failed assertions throw exceptions, eliminating if-clauses. Install via Composer: composer require beberlei/assert. | 2,427 | 2,460 | 186 | 2M | 30 | 50.3 | 64.1 | NOASSERTION | 4 months ago |
How can I help you explore Laravel packages today?