PHPackages                             iambrianreich/wordpress-testcase - 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. iambrianreich/wordpress-testcase

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

iambrianreich/wordpress-testcase
================================

PHPUnit extensions to make testing WordPress extensions easier.

v1.0.0(3y ago)012MITPHPPHP &gt;=8.0

Since Mar 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/iambrianreich/wordpress-testcase)[ Packagist](https://packagist.org/packages/iambrianreich/wordpress-testcase)[ RSS](/packages/iambrianreich-wordpress-testcase/feed)WikiDiscussions main Synced 1mo ago

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

iambrianreich/wordpress-testcase
================================

[](#iambrianreichwordpress-testcase)

This project provides a custom `TestCase` class and `Constraints` that make unit testing PHP extensions with PHPUnit simpler.

This project is meant to work in conjuction with the WP-CLI Instructions on setting up [PHPUnit Testing for WordPress](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/)it does not replace or supercede them.

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

[](#installation)

`composer require iambrianreich/wordpress-testcase`

Usage
-----

[](#usage)

You can either use the `Constraint` classes defined in this project directly or extend `BR\WordPress\TestCase\PHPUnit\TestCase`, which exposes the constraints through `assert*()` methods that allow you to easily validate your extensions integrations with WordPress.

```
