bebat/verify

BDD assertion library for PHPUnit

3.1.1 2022-11-10 04:22 UTC

README

BDD Assertions for PHPUnit and Codeception.

This is small wrapper for PHPUnit assertions that is aimed to make tests more readable and easier to maintain. With BDD assertions influenced by Chai, Jasmine, and RSpec your assertions will look a bit more like natural language.

Latest Stable Version Required PHP Version License Build Status Code Coverage

Most of the original work was done by @DavertMik and @Ragazzo in the Codeception/Verify repo. This version provides an alternate API and feature set, while sticking to the original BDD philosophy.

Installation

To install the current version of BeBat/Verify from Packagist, run the following in your project directory:

composer require --dev bebat/verify

BeBat/Verify will be added to your composer.json under require-dev and installed in your vendor directory.

Compatibility

BeBat/Verify is built on top of PHPUnit's own assertions. It is compatible with any version of PHPUnit 8 or 9 and has preliminary support for version 10. Some assertions have been removed from later versions of PHPUnit, and others added. Those assertions are noted in documentation below. When using Verify you should explicitly declare what version of PHPUnit your project depends on so that there are no surprise compatibility issues.

In addition, Verify is compatible with both PHP 7.2+ and 8+.

Documentation

Full documentation for BeBat/Verify can be found on Read the Docs.