PHPackages                             acro5piano/pest - 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. acro5piano/pest

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

acro5piano/pest
===============

A php unit testing library with Rspec style

08PHP

Since Apr 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/acro5piano/pest)[ Packagist](https://packagist.org/packages/acro5piano/pest)[ RSS](/packages/acro5piano-pest/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Pest
====

[](#pest)

A php unit testing library with Rspec style.

\[Under developing\]

Example
=======

[](#example)

```
use Acro5piano\Pest\Spec;

function add(int $x, int $y)
{
    return $x + $y;
}

Spec::describe('add', function ($it) {
    $it('returns 3 given 1, 2', function ($expect) {
        $expect(add(1, 2))->toBe(3);
    });
    $it('a failing test', function ($expect) {
        $expect(add(1, 2))->toBe(4);
    });
});
```

Result:

[![image](https://github.com/acro5piano/pest/raw/master/screenshot.png)](https://github.com/acro5piano/pest/blob/master/screenshot.png)

Documentation
=============

[](#documentation)

Install
-------

[](#install)

```
composer require --dev acro5piano/pest

```

Grouping
--------

[](#grouping)

You can nest with Type Hint.

```
use Acro5piano\Pest\Describe;

Spec::describe('1: first describe', function (Describe $describe) {
    $describe('2: second describe', function ($it) {
        $it('3: finally it comes', function ($expect) {
            $expect([1, 2])->not()->toContain(1);
        });
    });
});
```

Result:

```
Failed
  1: first describe
      2: second describe
            3: finally it comes

```

Assertions
----------

[](#assertions)

- `toBe`
- `toContain`

`not()` invert the condition. e.g.)

```
$expect([1, 2])->not()->toContain(3); // -> Fails
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f4a56131e6bc04df5e361dd551885ca8d2245dc33263532fb4b25c8a6d916ea?d=identicon)[acro5piano](/maintainers/acro5piano)

---

Top Contributors

[![acro5piano](https://avatars.githubusercontent.com/u/10719495?v=4)](https://github.com/acro5piano "acro5piano (8 commits)")

### Embed Badge

![Health badge](/badges/acro5piano-pest/health.svg)

```
[![Health](https://phpackages.com/badges/acro5piano-pest/health.svg)](https://phpackages.com/packages/acro5piano-pest)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M678](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M753](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M571](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.0k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
