PHP PHPunit

Open-source PHP projects categorized as PHPunit

Top 23 PHP PHPunit 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. 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

  4. Codeception

    Full-stack testing PHP framework

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

  6. PHP VCR

    Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.

  7. doctrine-test-bundle

    Symfony bundle to isolate your app's doctrine database tests and improve the test performance

    Project mention: How to set up Database Integration Tests in vanilla PHP | dev.to | 2025-11-29

    Reference: GitHub - dmaicher/doctrine-test-bundle

  8. phpunit-watcher

    A tool to automatically rerun PHPUnit tests when source code changes

  9. phpunit-speedtrap

    Reports on slow-running tests in your PHPUnit test suite

  10. wp_mock

    WordPress API Mocking Framework

  11. pao

    PAO is agent-optimized output for PHP testing tools.

    Project mention: Agentic PHPUnit output | dev.to | 2026-04-02

    I was made a aware of PAO. And while it think it is a good tool I think we can do better by making it more useful for an LLM.

  12. bypass-finals

    Removes `final` and `readonly` keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.

  13. Phake

    PHP Mocking Framework

  14. laravel-vue-crud-starter

    Laravel 8 + Vue 2 + AdminLTE 3 based Crud Starter template

  15. BrainMonkey

    Mocking utility for PHP functions and WordPress plugin API

  16. guzzler

    Supercharge your app or SDK with a testing library specifically for Guzzle

  17. Steward

    PHP libraries that makes Selenium WebDriver + PHPUnit functional testing easy and robust

  18. playwright

    Playwright PHP library for browser automation: navigation, E2E tests, assertions, screenshots, and so much more! (by playwright-php)

  19. phpunit-pretty-print

    ✅  Make your PHPUnit output beautiful

  20. PHPUnit-Polyfills

    Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests

  21. php-mock-phpunit

    Mock built-in PHP functions (e.g. time() or rand()) in PHPUnit.

  22. paraunit

    Run PHPUnit tests in parallel

  23. phpunit-architecture-test

    PHPUnit Application Architecture Test. For architecture tests

  24. laravel-dom-assertions

    Adds DOM assertions to laravels test responses

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 PHPunit discussion

Log in or Post with

PHP PHPunit related posts

  • 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
  • Top 16 Must-Have Resources for Advanced PHP Backend Development (Laravel & Symfony)

    5 projects | dev.to | 21 Jun 2025
  • How To Mock a Nested Laravel Artisan Command

    1 project | dev.to | 20 Apr 2025
  • How to migrate from Api Platform v2 to v3?

    2 projects | dev.to | 29 Nov 2023
  • BillaBear - Design Decisions ‐ Not Using Final Classes

    2 projects | /r/PHP | 11 Jul 2023
  • PHPUnit 10 - Coverage attributes

    1 project | /r/PHP | 23 Jun 2023
  • A note from our sponsor - SaaSHub
    www.saashub.com | 11 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

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

# Project Stars
1 PHPUnit 20,034
2 Mockery 10,722
3 Codeception 4,854
4 php-ddd-example 3,136
5 PHP VCR 1,207
6 doctrine-test-bundle 1,183
7 phpunit-watcher 873
8 phpunit-speedtrap 783
9 wp_mock 710
10 pao 632
11 bypass-finals 571
12 Phake 475
13 laravel-vue-crud-starter 430
14 BrainMonkey 339
15 guzzler 272
16 Steward 222
17 playwright 190
18 phpunit-pretty-print 186
19 PHPUnit-Polyfills 185
20 php-mock-phpunit 171
21 paraunit 145
22 phpunit-architecture-test 109
23 laravel-dom-assertions 106

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

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