PHPackages                             giorgiosironi/eris - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. giorgiosironi/eris

ActiveLibrary[Testing &amp; Quality](/categories/testing)

giorgiosironi/eris
==================

PHP library for property-based testing. Integrates with PHPUnit.

1.0.0(1y ago)4371.3M—7%34[3 issues](https://github.com/giorgiosironi/eris/issues)[1 PRs](https://github.com/giorgiosironi/eris/pulls)20MITPHPPHP ^8.1CI passing

Since Dec 8Pushed 7mo ago18 watchersCompare

[ Source](https://github.com/giorgiosironi/eris)[ Packagist](https://packagist.org/packages/giorgiosironi/eris)[ RSS](/packages/giorgiosironi-eris/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (7)Versions (31)Used By (20)

Eris
====

[](#eris)

[![CI](https://github.com/giorgiosironi/eris/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/giorgiosironi/eris/actions/workflows/ci.yml)[![Static analysis](https://github.com/giorgiosironi/eris/actions/workflows/static-analysis.yml/badge.svg?branch=master)](https://github.com/giorgiosironi/eris/actions/workflows/static-analysis.yml)[![Documentation Status](https://camo.githubusercontent.com/22177467543594b9a30f82175c9d1ae7d33622be222c8eadebb0966fd4bb107e/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f657269732f62616467652f3f76657273696f6e3d6c6174657374)](http://eris.readthedocs.org/en/latest/?badge=latest)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)

Eris is a porting of [QuickCheck](https://hackage.haskell.org/package/QuickCheck) and property-based testing tools to the PHP and PHPUnit ecosystem.

In property-based testing, several properties that the System Under Test must respect are defined, and a large sample of generated inputs is sent to it in an attempt to break the properties.

Compatibility
-------------

[](#compatibility)

- PHP 8.1, 8.2, 8.3, 8.4
- PHPUnit 10.x, 11.x

Installation
------------

[](#installation)

You can install Eris through [Composer](https://getcomposer.org/) by running the following command in your terminal:

```
composer require --dev giorgiosironi/eris

```

You can run some of Eris example tests with `vendor/bin/phpunit vendor/giorgiosironi/eris/examples`.

Here is an [empty sample project](https://github.com/giorgiosironi/eris-example) installing Eris.

Example usage within PHPUnit
----------------------------

[](#example-usage-within-phpunit)

This test tries to verify that natural numbers from 0 to 1000 are all smaller than 42. It's a failing test designed to show you an example of error message.

```
