defstudio/pest-plugin-laravel-expectations

A plugin to add laravel tailored expectations to Pest
653,706 98
Install
composer require defstudio/pest-plugin-laravel-expectations
Latest Version:v2.6.2
PHP:^8.1.0
License:MIT
Last Updated:Sep 15, 2026
Links: GitHub  ·  Packagist
Maintainer: fabio.ivona

Pest Laravel Expectations

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License

This Pest plugin adds Laravel specific expectations to the testing ecosystem

it('can check model exists', function(){
  $user = User::factory()->create();
  
  expect($user)->toExist();
});

Installation

You can install the package via composer:

composer require --dev defstudio/pest-plugin-laravel-11.expectations

The expectations added by this plugin are automatically loaded into Pest's expectation system. They can be used along other expectations.

Documentation

A full documentation with a detailed list of available expectations can be found at:

https://docs.defstudio.it/pest-plugin-laravel-expectations

Autocompletion

For PhpStorm users, a nice Plugin has been developed by Oliver Nybroe. It adds full autocompletion to ours Laravel Expectations, it is worth to take a look: https://github.com/pestphp/pest-intellij

Changelog

All notable changes to this project in our changelog. For a full understanding of what changed and the PR that where merged, see also the releases page

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Credits

Please see the contributing guide for details on how to contribute to this plugin.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

pestphp/pest-plugin-agent

AI agent verification plugin for Pest

618,373 7
nekofar/pest-plugin-mock-client

Pest Plugin for Mock HTTP client

22 1
quadraecom/pest-plugin-selectors

Add CSS selector-based testing capabilities to Pest

2,035 1
pestphp/pest-plugin-type-coverage

The Type Coverage plugin for Pest PHP.

6,380,677 37

Version History

Version Released PHP Laravel License
v2.6.2 ^8.1.0 ^10.0|^11.0.3|^12.0|^13.0 MIT
v2.6.1 ^8.1.0 ^10.0|^11.0.3|^12.0|^13.0 MIT
v2.6.0 ^8.1.0 ^10.0|^11.0.3|^12.0 MIT
v2.5.1 ^8.1.0 ^10.0|^11.0.3|^12.0 MIT
v2.5.0 ^8.1.0 ^10.0|^11.0.3|^12.0 MIT