behat/phpunit-assertions-extension
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.
FeatureContext with assertSame, assertCount, etc., and formats failures consistently in Behat output. That is measurable in step-definition lines-of-code and time-to-write-a-new-step — a real but small maintenance lever.Consider adopting (narrowly) when:
throw/inline assert code.Look elsewhere when:
php artisan test / Pest — a second runner is a CI and cognitive cost with no offsetting product value.Diligence flag: the last release date (2026-09-21) is ahead of today's date, which suggests a placeholder tag or broken metadata. Verify the actual tag and changelog before anything else.
To executives: "This is a small glue library for an older testing framework. It doesn't touch the product, revenue, or customer experience. We are not adopting it for new work — we're evaluating it as a short-term bridge for one existing test suite, with a known exit path. Direct cost is near zero; the real exposure is taking on a one-star dependency we'd have to maintain ourselves. Recommended decision: no for greenfield, time-boxed evaluation for the legacy suite, default answer 'no' unless that suite is actively costing us maintenance time."
To engineering: "Behat's own maintainers say don't start here. But if we have legacy Behat contexts with hand-rolled assertions, this standardizes failure output and strips boilerplate. It's an initializer plus a formatter — small enough that if it becomes a liability we vendor or replace it in a day. Pin the version, treat the future-dated release as an open diligence item, and don't let it become load-bearing."
How can I help you explore Laravel packages today?