vectorface/dunit
Vectorface's DUnit is a PHPUnit extension for database unit testing. It simplifies loading fixtures, isolating tests with transactions, and asserting on database state, helping PHP developers verify SQL-backed code against real databases in a familiar, lightweight PHPUnit workflow.
Illuminate\Foundation\Testing\TestCase, RefreshDatabase, factories, seeders, and native database assertions. v2.1.0 adds Docker image orchestration and terminal/CI ergonomics, but does not add Laravel integration.php-nightly image is explicitly PHP 7 beta, which reinforces that v2.1.0 is still aimed at a legacy PHP/PHPUnit era rather than modern Laravel versions.$COLUMNS, adding dunit --pull, and shrinking default images, but core risks remain: PHPUnit class/API compatibility, PHP version constraints, base-class conflicts with Laravel’s test case, database-specific assertion behavior, and supply-chain/CI risk. The Docker runner also introduces new operational dependencies: Docker availability, registry access, image pinning, and pull behavior.dunit --pull, and how will images be pinned/cached? Will php-nightly be excluded in favor of stable pinned images? Are parallel test execution, large fixture volumes, and cancellation behavior required? Who owns compatibility and security patching?require-dev only, pinned to an exact version, with no expectation of Laravel auto-discovery. Validate against the target PHPUnit API before committing. If the base class is incompatible, wrap only the useful assertion/data-set behavior behind a small internal trait or helper rather than inheriting from DUnit directly. If using v2.1.0’s Docker runner, treat Docker as part of the test toolchain and pin images rather than relying on mutable tags or php-nightly.assertDatabaseHas/assertDatabaseMissing, schema assertions, factories, and seeders. For new tests, start with Laravel’s RefreshDatabase or transaction strategy and use DUnit-style table comparison only where it adds clear value. v2.1.0’s --pull feature should be adopted, if at all, with explicit image pinning and CI caching policy.$COLUMNS fixes. Avoid coupling core test infrastructure to DUnit until the spike passes.php-nightly from standard CI.--pull behavior, Ctrl+C cancellation, and terminal-width output in CI before enabling broadly.RefreshDatabase.--pull can reduce stale-image friction, but parallel CI still requires careful database isolation and Docker image caching. --pull can add network latency and registry rate-limit exposure if used naively across parallel jobs. Large data sets, schema drift, and cross-engine differences still reduce scalability.php-nightly instability; --pull network failures; PHPUnit/PHP fatal incompatibility; Laravel test-case conflicts; PDO driver variance; fixture ordering/type mismatches; test pollution from incomplete resets; schema drift after migrations; flaky CI due to shared databases; abandoned-dependency security findings. The Ctrl+C and $COLUMNS fixes reduce particular CI annoyances but do not address the core compatibility risks.How can I help you explore Laravel packages today?