Experimental Drupal Flake Adds PHPUnit Testing for Local Development
John Locke of Freelock has introduced new PHPUnit testing support for Drupal Flake, an experimental local development environment built with Nix flakes. Unlike DDev, which relies on Docker containers, Drupal Flake uses Nix to manage services and tools without containers, giving developers direct access to their shell utilities while running Drupal sites locally.
The update makes PHPUnit integration easier with commands like phpunit-setup for configuration and phpunit-module to target specific modules. It also includes helpers such as phpunit-custom for running tests across custom modules. While still experimental, this feature has been tested with PHP 8.3 and Drupal 11.2.
John Locke encourages developers to experiment with the new setup and provide feedback through the Drupal.org issue queue. He positions Drupal Flake as a lightweight, Nix-driven alternative to Docker-based workflows, offering rapid setup, debugging tools, and support for custom development utilities.
First introduced at DrupalCon Atlanta in March 2025, Drupal Flake continues to evolve toward becoming a specialized local development environment for Drupal, aimed at improving speed, flexibility, and testing capabilities for developers who prefer Nix over containerized solutions.


