PHPackages                             worksome/pretty-pest - 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. worksome/pretty-pest

ActivePhpcodesniffer-standard[Testing &amp; Quality](/categories/testing)

worksome/pretty-pest
====================

Automatically format your Pest PHP tests.

v0.2.2(2y ago)7378.5k1[1 PRs](https://github.com/worksome/pretty-pest/pulls)1MITPHPPHP ^8.2

Since Mar 10Pushed 2y ago13 watchersCompare

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

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

Pretty Pest
===========

[](#pretty-pest)

Enforce consistent styling for your Pest PHP tests!

[![Tests](https://github.com/worksome/pretty-pest/actions/workflows/tests.yml/badge.svg)](https://github.com/worksome/pretty-pest/actions/workflows/tests.yml)

There are lots of important decisions to worry about as a developer. You know what you shouldn't be worrying about? The order of your tests! But you still want your tests to look nice, right?

That's why we created Pretty Pest. This code style plugin ensures that your Pest tests are automatically formatted correctly so that you don't have to spend time doing so manually.

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

[](#installation)

You can install the package via composer.

```
composer require worksome/pretty-pest --dev
```

PHPCBF
------

[](#phpcbf)

You can enable Pretty Pest in [PHPCBF](https://github.com/squizlabs/PHP_CodeSniffer) by adding the `PrettyPest` rule to your `phpcs.xml` file.

```

```

Pretty Pest has 2 sniffs for [PHPCBF](https://github.com/squizlabs/PHP_CodeSniffer):

- `EnsureTestFunctionsAreOrdered`
- `NewLineAfterTestFunctions`

### EnsureTestFunctionsAreOrdered

[](#ensuretestfunctionsareordered)

This sniff will ensure that your pest functions are ordered correctly in the test file. By default, we use the following order:

```
[
    'uses',
    'beforeAll',
    'beforeEach',
    'afterEach',
    'afterAll',
    // The array syntax indicates that `test` and `it` are to be treated as the same function.
    ['test', 'it'],
    'dataset',
]
```

Any functions that are out of order will be moved in the file. Of course, you can always override this order to your preference in the `phpcs.xml` file.

```

```

### NewLineAfterTestFunctions

[](#newlineaftertestfunctions)

This sniff will replace all whitespace after a Pest function with a single new line to ensure that spacing in your test files is consistent.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Luke Downing](https://github.com/lukeraymonddowning)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.5% 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 ~233 days

Total

4

Last Release

830d ago

PHP version history (2 changes)v0.1.0PHP ^8.0

v0.2.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/139db346fa173a79481af05b0455e2e8ad7d2ab594c7f53bde3522a3dfeeaf25?d=identicon)[96downlu](/maintainers/96downlu)

---

Top Contributors

[![lukeraymonddowning](https://avatars.githubusercontent.com/u/12202279?v=4)](https://github.com/lukeraymonddowning "lukeraymonddowning (33 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (8 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/worksome-pretty-pest/health.svg)

```
[![Health](https://phpackages.com/badges/worksome-pretty-pest/health.svg)](https://phpackages.com/packages/worksome-pretty-pest)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k123.5M1.8k](/packages/slevomat-coding-standard)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)[moodlehq/moodle-cs

Moodle Coding Sniffer rules

242.8M5](/packages/moodlehq-moodle-cs)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)

PHPackages © 2026

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