PHP Testing

Open-source PHP projects categorized as Testing

Top 23 PHP Testing Projects

  1. PHPUnit

    The PHP Unit Testing framework.

  2. AppSignal

    Monitoring that respects your time & budget. APM, error tracking, and dashboards for modern web apps. Ten-minute setup, transparent flat pricing, and support from engineers who actually use the product.

    AppSignal logo
  3. PHPStan

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

    Project mention: Clean code didn't get less important in the AI age — it got more important | dev.to | 2026-09-13

    For static analysis there's PHPStan for PHP and mypy for Python. For formatting, Prettier and gofmt are the cheapest guardrail there is, with zero excuse not to run one. For security, Semgrep covers the same principle at higher stakes.

  4. Pest

    The elegant testing framework for PHP developers and AI agents.

    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. SaaSHub

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

    SaaSHub logo
  10. Behat

    BDD in PHP

  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. 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.

  13. Alice

    Expressive fixtures generator (by nelmio)

  14. ParaTest

    :computer: Parallel testing for PHPUnit

  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. testbench

    Laravel Testing Helper for Packages Development

  17. dusk

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

  18. PHPSpec

    SpecBDD Framework for PHP

  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. foundry

    A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine. (by zenstruck)

  25. AspectMock

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

  26. SaaSHub

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

    SaaSHub logo
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

  • Integrating Web Application Firewalls (WAF) with PHP Framework

    2 projects | dev.to | 28 Sep 2026
  • 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
  • A note from our sponsor - AppSignal
    www.appsignal.com | 10 Oct 2026
    APM, error tracking, and dashboards for modern web apps. Ten-minute setup, transparent flat pricing, and support from engineers who actually use the product. 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,062
2 PHPStan 14,120
3 Pest 11,735
4 Mockery 10,723
5 Prophecy 8,466
6 php-webdriver 5,198
7 Codeception 4,858
8 Behat 3,974
9 phoronix-test-suite 3,151
10 php-ddd-example 3,144
11 Alice 2,539
12 ParaTest 2,511
13 Infection 2,250
14 testbench 2,242
15 dusk 1,946
16 PHPSpec 1,902
17 VFS Stream 1,440
18 PHP Architecture Tester 1,280
19 Kahlan 1,146
20 arkitect 935
21 phpunit-watcher 876
22 foundry 802
23 AspectMock 785

Sponsored
Monitoring that respects your time & budget
APM, error tracking, and dashboards for modern web apps. Ten-minute setup, transparent flat pricing, and support from engineers who actually use the product.
www.appsignal.com

Did you know that PHP is
the 13th most popular programming language
based on number of references?