pestphp logo

PESTPHP

The elegant PHP
testing framework

Pest is a testing framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.

Graceful Sponsors

Place your logo here

What makes Pest special…

Syntax you can fall in love with.

<?php

it('has a welcome page', function () {
    $response = $this->get('/');

    expect($response->status())->toBe(200);
});

What they say…

“Pest is minimal,
distraction-free, and
a joy to use.”

Taylor Otwell · Creator of Laravel

“It took me a year to finally give Pest
a try… and ten minutes to make the switch.
Pest is the way.

“I wouldn't be surprised
if Pest becomes the
default test runner in PHP
in the near future.”

Freek Van der Herten · Developer at Spatie

“Testing becomes an
addiction in every project.”

Caneco · Full-Stack Developer at Medicare

FAQs

  • How does Pest differ from PHPUnit?

    Pest is built on top of PHPUnit, but it spices things up with some neat features you might dig. With Pest, you have access to a user-friendly API that is inspired by Ruby's Rspec and Jest libraries, making it easy to write elegant tests quickly. Additionally, Pest's console output is truly stunning and makes it effortless to spot any issues that arise. But the benefits don't end there - Pest also includes features such as built-in parallel testing, coverage, watch mode, architecture testing, native profiling tools, snapshot testing, and the most beautiful documentation in the world.


  • Do I need to rewrite all my PHPUnit tests for Pest?

    No need to rewrite your PHPUnit tests for Pest. Pest is designed to be progressive. You can start using Pest's features immediately after installation. However, if you want to migrate to Pest's intuitive API, community-developed migration tools are available that can do the job in as little as 3 seconds.


  • Is everything on Pest free?

    Yes, Pest is an open-source testing framework, and all of its features and functionalities are available for free. Pest is released under the MIT license, which means you can use it, even in commercial projects. Additionally, Pest's extensive documentation, editor integrations, and community-developed plugins are also available for free.


  • Who maintains Pest?

    Pest has a team of more than a dozen maintainers who are committed to developing and enhancing the framework. The team is spread across different regions and countries, making it a diverse and inclusive community.