Global Assertions Plugin


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

Source code:


Install the Global Assertions Plugin via the Composer package manager:

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

Available functions

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.

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

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

Next section: Snapshots →