PHPackages                             tn-xfive/wp-unit-tests-scaffold - 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. tn-xfive/wp-unit-tests-scaffold

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

tn-xfive/wp-unit-tests-scaffold
===============================

Scaffold PHPUnit tests setup for WordPress themes and plugins.

v1.1.1(3mo ago)07MITPHPPHP &gt;=7.4

Since Nov 27Pushed 3mo agoCompare

[ Source](https://github.com/nowapracownia/wp-unit-tests)[ Packagist](https://packagist.org/packages/tn-xfive/wp-unit-tests-scaffold)[ RSS](/packages/tn-xfive-wp-unit-tests-scaffold/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

wp-unit-tests
=============

[](#wp-unit-tests)

Tests setup and boilerplate for testing WordPress with PHPUnit.

Usage in projects
-----------------

[](#usage-in-projects)

To start using PHPUnit for unit testing in WordPress first install PHPUnit in your project (prefereably with Composer: `composer require --dev phpunit/phpunit:"^9.5"`, see ). We need version 9.5 to be compatible with WordPress tests SDK.

Then install WordPress tests SDK with `composer require --dev wp-phpunit/wp-phpunit:"^6.9"` and `composer require --dev yoast/phpunit-polyfills:"^2.0"`.

Then navigate to your project root and run the following commands:

1. `composer require --dev tn-xfive/wp-unit-tests-scaffold`
2. `vendor/bin/scaffold`

See `wp-tests-config-sample.php` file in `/tests` directory and edit it as instructed.

We are assuming here, that your project root is a WordPress theme or a plugin. If the root is a different folder, then after installation adjust `tests/bootstrap.php` accordingly to point to a proper `wp-load.php` location.

Test file boilerplate
---------------------

[](#test-file-boilerplate)

There is a boilerplate test file prefilled with some handy test case examples. You can copy them elsewhere and populate the file with your own tests.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance79

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

3

Last Release

110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/60287e05684e1912424fd59b20219c901aeb1b496c8ca302d840c4ecab395b4e?d=identicon)[nowapracownia](/maintainers/nowapracownia)

---

Top Contributors

[![nowapracownia](https://avatars.githubusercontent.com/u/80505644?v=4)](https://github.com/nowapracownia "nowapracownia (7 commits)")

---

Tags

testingphpunitwordpressscaffoldwp-phpunit

### Embed Badge

![Health badge](/badges/tn-xfive-wp-unit-tests-scaffold/health.svg)

```
[![Health](https://phpackages.com/badges/tn-xfive-wp-unit-tests-scaffold/health.svg)](https://phpackages.com/packages/tn-xfive-wp-unit-tests-scaffold)
```

###  Alternatives

[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69417.9M511](/packages/spatie-phpunit-snapshot-assertions)[yoast/wp-test-utils

PHPUnit cross-version compatibility layer for testing plugins and themes build for WordPress

632.3M51](/packages/yoast-wp-test-utils)[ockcyp/covers-validator

Validates @covers tags in PHPUnit tests

21198.0k82](/packages/ockcyp-covers-validator)[albertcht/lumen-testing

Testing Suite For Lumen like Laravel does.

4335.5k1](/packages/albertcht-lumen-testing)[lastzero/test-tools

Increases testing productivity by adding a service container and self-initializing fakes to PHPUnit

2244.3k13](/packages/lastzero-test-tools)

PHPackages © 2026

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