jasonmccreary/laravel-test-assertions
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.
Full Changelog: https://github.com/jasonmccreary/laravel-test-assertions/compare/v2.8.0...v2.9.0
f1cbfc1asssertViewHasNull assertion to TestResponse in 933c2d3excluded_middleware into account for middleware assertions (#38)This is a superficial major version release. It marks the adoption of a new Support Policy by dropping support for old versions of Laravel (currently 6.x, 7.x). There are no changes to functionality or underlying code other than requiring the latest stable version of Laravel (currently 8.x).
This also removes the assertNotSoftDeleted assertion in favor of using the native assertNotSoftDeleted added in Laravel 8.62. As the first parameter matches, no code changes are required.
assertJsonTypedStructure to verify data type of values (#19)assertRouteUsesMiddleware assertion (#23)assertNotSoftDeleted assertion (#28)This marks the 1.0 release as I finalized the trait naming.
Please note, if you were using this package before, you will need to rename all uses of the HttpTestAssertions trait to AdditionalAssertions.
Includes the following new assertions. Review the Assertions section of the README for documentation.
assertRouteUsesFormRequestassertValidationRulesassertExactValidationRulesassertValidationRuleContainsAdds assertActionUsesMiddleware to verify a controller action is using a middleware or set of middleware.
Add custom Mockery argument matchers for common Laravel types including models, collections, and Eloquent collections.
How can I help you explore Laravel packages today?