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.