PHPackages                             wyrihaximus/test-utilities - 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. wyrihaximus/test-utilities

ActiveComposer-plugin[Testing &amp; Quality](/categories/testing)

wyrihaximus/test-utilities
==========================

🛠️ Test utilities for api-clients packages

12.0.0(3mo ago)71.2M↓18.7%1[8 PRs](https://github.com/WyriHaximus/php-test-utilities/pulls)20MITMakefilePHP ^8.4CI passing

Since Jan 20Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/php-test-utilities)[ Packagist](https://packagist.org/packages/wyrihaximus/test-utilities)[ GitHub Sponsors](https://github.com/WyriHaximus)[ RSS](/packages/wyrihaximus-test-utilities/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (163)Used By (20)

Test utilities
==============

[](#test-utilities)

[![Continuous Integration](https://github.com/wyrihaximus/php-test-utilities/workflows/Continuous%20Integration/badge.svg)](https://github.com/wyrihaximus/php-test-utilities/workflows/Continuous%20Integration/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/b7d67ef455b63eacb4ad3017aea8a66ba5373a2732993dbb9bc22eb5b542d908/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f746573742d7574696c69746965732f762f737461626c652e706e67)](https://packagist.org/packages/wyrihaximus/test-utilities)[![Total Downloads](https://camo.githubusercontent.com/e341216fba576373a87f15756c894a2260b0d5dac894856fa0340336cedb92f0/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f746573742d7574696c69746965732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wyrihaximus/test-utilities/stats)[![Type Coverage](https://camo.githubusercontent.com/f06eebaeda34b5c20dfe2cce6c89e2caff9a423964290b806a9039eed4b4386c/68747470733a2f2f73686570686572642e6465762f6769746875622f57797269486178696d75732f7068702d746573742d7574696c69746965732f636f7665726167652e737667)](https://shepherd.dev/github/WyriHaximus/php-test-utilities)[![License](https://camo.githubusercontent.com/4fdb0d7e8ddf25f3b1d3f30741004c550f59c507b084bb69ec6162548e7ad14a/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f746573742d7574696c69746965732f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/test-utilities)

Installation
============

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/test-utilities

```

Usage
=====

[](#usage)

PHPStan
-------

[](#phpstan)

Some defaults to make working with this package easier with PHPStan have been added to exposed as an extension config.

PHPUnit
-------

[](#phpunit)

Any test file can extend `WyriHaximus\TestUtilities\TestCase` and it comes with some goodies such as random namespaces and random directories to use for file storage related tests.

Rector
------

[](#rector)

A `RectorConfig` is provided with defaults including where `etc`, `src`, and `tests` are. It also converts all doc tags to attributes that it's aware of.

```
