PHPackages                             tj09/test-utils - 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. tj09/test-utils

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

tj09/test-utils
===============

Mocking utils for test cases.

2.2.0(1y ago)0111MITPHPPHP &gt;=8CI failing

Since Dec 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/TJ09/php-test-utils)[ Packagist](https://packagist.org/packages/tj09/test-utils)[ RSS](/packages/tj09-test-utils/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

Test Utils
==========

[](#test-utils)

Some common test utils used across projects. Likely not useful outside of projects that happen to use them.

Includes:

- **MockFunctions** A wrapper around [`uopz`](https://www.php.net/manual/en/book.uopz.php) to make it easy-ish to stub out functions in tests.
- **BaseTestCase** Test case class that will clear mocks and APC after each test.
- **TestPDO** Allows copying an existing database's schema into temporary tables in another database, presenting a clean slate for tests.
- **TestWithSnapshots** Provides assertions for tests to assert that some data matches a previously-recorded state.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance47

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

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 ~161 days

Total

2

Last Release

391d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4400e0661d6dad67be2cf5f796e80e2030d5618b2a27df3209aa07195da29429?d=identicon)[tjl](/maintainers/tjl)

---

Top Contributors

[![TJ09](https://avatars.githubusercontent.com/u/829579?v=4)](https://github.com/TJ09 "TJ09 (5 commits)")

### Embed Badge

![Health badge](/badges/tj09-test-utils/health.svg)

```
[![Health](https://phpackages.com/badges/tj09-test-utils/health.svg)](https://phpackages.com/packages/tj09-test-utils)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k136.1M986](/packages/brianium-paratest)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M344](/packages/drupal-core-dev)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

30314.4k7](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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