PHPackages                             forevermatt/readable-unit-tests-php - 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. forevermatt/readable-unit-tests-php

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

forevermatt/readable-unit-tests-php
===================================

A Gherkin-based PHP unit-testing framework

0.3.0(7y ago)07[5 issues](https://github.com/forevermatt/readable-unit-tests-php/issues)MITPHPPHP ^7.0

Since Aug 23Pushed 6y agoCompare

[ Source](https://github.com/forevermatt/readable-unit-tests-php)[ Packagist](https://packagist.org/packages/forevermatt/readable-unit-tests-php)[ RSS](/packages/forevermatt-readable-unit-tests-php/feed)WikiDiscussions develop Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (5)Used By (0)

Readable Unit Tests (PHP)
=========================

[](#readable-unit-tests-php)

A Gherkin-based PHP unit-testing framework

Install it
----------

[](#install-it)

The easiest way to install Readable Unit Tests (PHP) is to use [Composer](https://getcomposer.org/):

```
composer require --dev forevermatt/readable-unit-tests-php

```

Try it out
----------

[](#try-it-out)

If you clone this repo, you can use the following command to run the sample tests:

```
php run-tests.php sample/src

```

Generate skeleton test files
----------------------------

[](#generate-skeleton-test-files)

To generate basic/skeleton test specification and test implementation files, run something like the following (replacing `sample/src` with the path to your files):

```
php generate-test-files.php sample/src

```

Goals
-----

[](#goals)

- Tests written in Gherkin (aka "plain English")
- The ability to **unit** test PHP
- One `.test` file per PHP file/class (containing Gherkin)
- One corresponding `...Test.php` file with the PHP implementation of those test steps

Example folder/file structure
-----------------------------

[](#example-folderfile-structure)

```
- sample
  - src/
    - Calculator.php (PHP class to be tested)
  - tests/
    - unit/
      - Calculator.test (Gherkin)
      - CalculatorTest.php (PHP implementation of test steps)

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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.

###  Release Activity

Cadence

Every ~11 days

Total

3

Last Release

2799d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/836739aa4f60c754dc9a4a547ebd0c166e4b6e855d9f119df2be5aec92f3a375?d=identicon)[forevermatt](/maintainers/forevermatt)

---

Top Contributors

[![forevermatt](https://avatars.githubusercontent.com/u/6233204?v=4)](https://github.com/forevermatt "forevermatt (73 commits)")

### Embed Badge

![Health badge](/badges/forevermatt-readable-unit-tests-php/health.svg)

```
[![Health](https://phpackages.com/badges/forevermatt-readable-unit-tests-php/health.svg)](https://phpackages.com/packages/forevermatt-readable-unit-tests-php)
```

###  Alternatives

[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[drupal/drupal-extension

Drupal extension for Behat

22215.1M147](/packages/drupal-drupal-extension)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)

PHPackages © 2026

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