Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Test Assertions Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v2.8.0

Added

  • Add "now" time helper and assertion in f1cbfc1
v2.7.1

Added

  • Create "stub" file for IDE completion (da06c66)
v2.7.0

Added

  • Add asssertViewHasNull assertion to TestResponse in 933c2d3
v2.6.0

Removed

  • Drop support for Laravel 10
v2.5.0
v2.4.1
v2.4.0

Added

  • Add assertion to route group middleware in #44
  • Laravel 11 Compatibility in #46

Removed

  • Support for Laravel 9 in #46
  • Support for PHPUnit 9 in #46
v2.3.0

Added

Removed

  • Dropped support for Laravel 8 (77d1812dce4438c294e281acade9d52adf4ce0a0)
  • Dropped support for PHP 7 (77d1812dce4438c294e281acade9d52adf4ce0a0)
v2.2.0

Added

  • Support for Laravel 10 (#40)
v2.1.1

Fixed

  • Take excluded_middleware into account for middleware assertions (#38)
v2.1.0

Added

  • Support for PHP 8 and Laravel 9 (#36)
v2.0.0

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.

v1.1.0

Added

  • assertJsonTypedStructure to verify data type of values (#19)
  • assertRouteUsesMiddleware assertion (#23)
  • assertNotSoftDeleted assertion (#28)
  • Create CHANGELOG (cbe01c6)
v1.0.0

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.

v0.5.1
v0.5.0
v0.4.1
v0.4.0

Includes the following new assertions. Review the Assertions section of the README for documentation.

  • assertRouteUsesFormRequest
  • assertValidationRules
  • assertExactValidationRules
  • assertValidationRuleContains
v0.3.0

Adds assertActionUsesMiddleware to verify a controller action is using a middleware or set of middleware.

0.2.0

Add custom Mockery argument matchers for common Laravel types including models, collections, and Eloquent collections.

0.1.0
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony