Skip to content
Free since 2014. Built for the engineers who keep things running.

cat /articles/microunit-10-a-zero-dependency-testing-framework-for-php.md

PHP

MicroUnit 1.0: A Zero-Dependency Testing Framework for PHP

MicroUnit 1.0 is a PHP testing framework with no Composer dependencies, closure-based tests, built-in mocks, coverage, and a claimed speed advantage over PHPUnit. It requires PHP 8.5 or newer.

PHP News25 Nov 2026 · 7 min read · summary

article --summary

The summary

This announcement introduces MicroUnit 1.0, a PHP testing framework that installs no other Composer packages and defines each test as a named closure instead of a class method. Mocks, snapshots, parallel runs, and line coverage come bundled, and integrations exist for Laravel, Symfony, and CodeIgniter. The article walks through a sample test file with fixtures and data-driven groups, and explains the assertion style, which takes the expected value first. It also covers a coverage setup that needs no Xdebug or PCOV, along with its limits, such as line coverage only and slower runs. The project reports that MicroUnit ran faster than PHPUnit in all 24 benchmark comparisons across six open-source projects, with a median full-suite speedup of 2.05x. These are the maintainer's own numbers, measured on one laptop, and the article notes that gains were smaller on suites where tests themselves dominate runtime. A migration command converts existing PHPUnit suites, though tests using certain attributes become skipped stubs.

Editorial note: This is a summary of an article first published by PHP News. The full piece is on their site.

Reading now

Topic
PHP
Source
PHP News
Published
25 Nov 2026
Format
Curated summary

Have a take on this?

Write it up and submit it. It goes on the list once an editor approves it.

Submit an article

articles --latest

Latest articles

New from the blogs we follow and the community.

All articles

newsletter --weekly

LaraChat Weekly, minus the noise.

The best reads, new jobs and upcoming events, in one email a week.