PHP Testing

Open-source PHP projects categorized as Testing

Top 23 PHP Testing Projects

  1. PHPUnit

    The PHP Unit Testing framework.

    Project mention: Top 16 Must-Have Resources for Advanced PHP Backend Development (Laravel & Symfony) | dev.to | 2025-06-21

    PHPUnit: PHPUnit is the indispensable unit testing framework for PHP. Mastering it is not just about writing tests; it's about adopting a disciplined approach to development, ensuring code quality, and facilitating refactoring. It's fundamental for building robust and reliable backend systems. Explore PHPUnit

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. PHPStan

    PHP Static Analysis Tool - discover bugs in your code without running it!

    Project mention: Running Rust Binaries on Shared Hosting: A Practical Approach to Type Safety on a Budget | dev.to | 2025-10-17

    I was tired of PHP's type system. Even with PHPStan and Psalm, there's no substitute for real compile-time guarantees. But I'm also practical - I don't want to pay for a VPS, maintain a server, manage security updates, configure databases, set up backups, and babysit infrastructure when shared hosting costs < $10/month and handles all of that for me.

  4. Pest

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

    Project mention: Copy-Pasting HTTP Fakes by Hand? Laravel Http Automock Can Do It For You | dev.to | 2026-03-10

    Requires PHP 8.2+, Laravel 11+, and Pest Works only with Laravel's HTTP client.

  5. Mockery

    Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL).

    Project mention: PHPUnit: Test Closures with Mockery::spy | dev.to | 2026-03-02

    Using Mockery::spy to Verify Closures

  6. Prophecy

    Highly opinionated mocking framework for PHP 5.3+

  7. php-webdriver

    PHP client for Selenium/WebDriver protocol. Previously facebook/php-webdriver

  8. Codeception

    Full-stack testing PHP framework

  9. Behat

    BDD in PHP

  10. php-ddd-example

    🐘🎯 Hexagonal Architecture + DDD + CQRS in PHP using Symfony 7

    Project mention: I Curated 106 Software Design Resources and Ranked What Actually Matters | dev.to | 2026-02-12

    CodelyTV/php-ddd-example — DDD + Hexagonal in PHP/Symfony. If you're a PHP developer, start here.

  11. phoronix-test-suite

    The Phoronix Test Suite open-source, cross-platform automated testing/benchmarking software.

    Project mention: Cache Aware Scheduling Shows Nice Wins for AMD Zen 5 on PostgreSQL, Valkey | news.ycombinator.com | 2026-05-29
  12. Alice

    Expressive fixtures generator (by nelmio)

  13. ParaTest

    :computer: Parallel testing for PHPUnit

  14. testbench

    Laravel Testing Helper for Packages Development

  15. Infection

    PHP Mutation Testing library

    Project mention: How Mutation Testing Exposes the Truth (PHP 2026 Edition) | dev.to | 2026-05-12

    I've been there. And for a long time, I thought the answer was more tests. What I actually needed was better tests. That's exactly what mutation testing taught me, and after using Infection PHP in production projects through 2025 and into 2026, I can confidently say it changed how I think about test quality entirely.

  16. dusk

    Laravel Dusk provides simple end-to-end testing and browser automation.

  17. PHPSpec

    SpecBDD Framework for PHP

  18. Atoum

    The modern, simple and intuitive PHP unit testing framework.

  19. VFS Stream

    vfsStream is a stream wrapper for a virtual file system that may be helpful in unit tests to mock the real file system. It can be used with any unit test framework, like PHPUnit or SimpleTest.

  20. PHP Architecture Tester

    ✔️ PHP Architecture Tester - Easy architecture testing for PHP

  21. Kahlan

    :heavy_check_mark: PHP Test Framework for Freedom, Truth, and Justice

  22. arkitect

    Put your architectural rules under test!

  23. phpunit-watcher

    A tool to automatically rerun PHPUnit tests when source code changes

  24. AspectMock

    The most powerful and flexible mocking framework for PHPUnit / Codeception.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

PHP Testing discussion

Log in or Post with

PHP Testing related posts

  • How Mutation Testing Exposes the Truth (PHP 2026 Edition)

    1 project | dev.to | 12 May 2026
  • I built a WordPress plugin that generates llms.txt from your sitemap

    3 projects | dev.to | 21 Apr 2026
  • Copy-Pasting HTTP Fakes by Hand? Laravel Http Automock Can Do It For You

    2 projects | dev.to | 10 Mar 2026
  • Mocking HTTP Services in PHP with Phiremock

    1 project | dev.to | 3 Mar 2026
  • PHPUnit: Test Closures with Mockery::spy

    1 project | dev.to | 2 Mar 2026
  • Mock IteratorAggregate with Mockery to Fix foreach in Tests

    1 project | dev.to | 2 Mar 2026
  • Solving Flaky Session Tests in Laravel: From Chaos to Stability

    1 project | dev.to | 28 Jan 2026
  • A note from our sponsor - SaaSHub
    www.saashub.com | 9 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source Testing projects in PHP? This list will help you:

# Project Stars
1 PHPUnit 20,034
2 PHPStan 13,983
3 Pest 11,523
4 Mockery 10,722
5 Prophecy 8,482
6 php-webdriver 5,206
7 Codeception 4,854
8 Behat 3,956
9 php-ddd-example 3,136
10 phoronix-test-suite 3,064
11 Alice 2,540
12 ParaTest 2,472
13 testbench 2,228
14 Infection 2,206
15 dusk 1,940
16 PHPSpec 1,901
17 Atoum 1,442
18 VFS Stream 1,436
19 PHP Architecture Tester 1,263
20 Kahlan 1,146
21 arkitect 911
22 phpunit-watcher 873
23 AspectMock 790

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com