Global Assertions Plugin

The Global Assertions Plugin for Pest provides global functions for assertions that were removed in v0.3

Source code: github.com/pestphp/pest-plugin-global-assertions

Install the plugin using Composer:

composer require pestphp/pest-plugin-global-assertions --dev

This allows you to do the following, without calling the $this object. For a full list of available methods, please refer to the compiled list.

it('asserts true is true using global function', function () {
    assertTrue(true);
});

This plugin is a good temporary helper when upgrading to the Expectations API in Pest v0.3


Next section: Snapshots →