PHPackages                             ez-php/testing - 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. [Framework](/categories/framework)
4. /
5. ez-php/testing

ActiveLibrary[Framework](/categories/framework)

ez-php/testing
==============

Test utilities for the ez-php framework — ApplicationTestCase, DatabaseTestCase, HttpTestCase, ModelFactory

1.11.1(1mo ago)03.3k↓90%1MITPHPPHP ^8.5CI passing

Since Mar 16Pushed 1mo agoCompare

[ Source](https://github.com/ez-php/testing)[ Packagist](https://packagist.org/packages/ez-php/testing)[ Docs](https://github.com/ez-php/testing)[ RSS](/packages/ez-php-testing/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (16)Versions (40)Used By (1)

ez-php/testing
==============

[](#ez-phptesting)

Framework-independent test utilities for [ez-php](https://github.com/ez-php) — response assertions and an entity factory.

> **Looking for `ApplicationTestCase`, `DatabaseTestCase`, or `HttpTestCase`?**Those live in [`ez-php/testing-application`](https://github.com/ez-php/testing-application), which boots the full framework stack.

Requirements
------------

[](#requirements)

- PHP 8.5+
- PHPUnit 13+
- ez-php/http
- ez-php/orm

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

[](#installation)

```
composer require --dev ez-php/testing
```

Classes
-------

[](#classes)

### `TestResponse`

[](#testresponse)

Wraps a `Response` with a fluent PHPUnit assertion API. Returned by `HttpTestCase` helpers in `ez-php/testing-application`.

MethodDescription`assertStatus(int)`Exact status code`assertOk()`Status 200`assertNotFound()`Status 404`assertRedirect(?string)`3xx; optional Location header`assertSee(string)`Body contains substring`assertJson(array)`Body decodes to exact array`assertHeader(string, ?string)`Header present; optional value### `EntityFactory`

[](#entityfactory)

Builds and optionally persists Entity instances with default attributes. Callable defaults are invoked once per instance. Persistence is delegated to an `AbstractRepository`.

```
use EzPhp\Testing\EntityFactory;

$factory = new EntityFactory(User::class, $userRepo, [
    'name'  => 'Alice',
    'email' => fn () => uniqid('user_') . '@example.com',
]);

$user  = $factory->make();             // not persisted
$user  = $factory->create();           // persisted via $userRepo->save()
$users = $factory->makeMany(3);
$users = $factory->createMany(5, ['role' => 'admin']);
```

Setup (standalone development)
------------------------------

[](#setup-standalone-development)

```
cp .env.example .env
./start.sh
```

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance91

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 89.2% 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 ~1 days

Total

39

Last Release

44d ago

Major Versions

0.9.3 → 1.0.02026-03-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/122030400?v=4)[AU9500](/maintainers/AU9500)[@AU9500](https://github.com/AU9500)

---

Top Contributors

[![AU9500](https://avatars.githubusercontent.com/u/122030400?v=4)](https://github.com/AU9500 "AU9500 (107 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")

---

Tags

phptestingphpunitframeworkfactorytest caseez-php

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ez-php-testing/health.svg)

```
[![Health](https://phpackages.com/badges/ez-php-testing/health.svg)](https://phpackages.com/packages/ez-php-testing)
```

###  Alternatives

[pestphp/pest

The elegant PHP Testing Framework.

11.5k67.7M18.9k](/packages/pestphp-pest)[pestphp/pest-plugin-type-coverage

The Type Coverage plugin for Pest PHP.

353.9M979](/packages/pestphp-pest-plugin-type-coverage)[pestphp/pest-dev-tools

Dev requirements for Pest, The elegant PHP Testing Framework.

10186.8k88](/packages/pestphp-pest-dev-tools)

PHPackages © 2026

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