Continuous Integration: Running Isolated Tests inside PHP Subprocesses

The Hazard of Shared Test Contexts

Automated testing is a critical requirement for maintaining software stability. However, traditional testing suites load all test classes into a single, shared PHP execution process. This introduces severe testing hazards, where static variables, mock session variables, and cached database connections bleed between tests and lead to false positives.

Spawning Isolated PHP Subprocesses

Zero CMS features a custom subprocess test runner that executes each suite sequentially inside an isolated PHP subprocess (exec("php {testFile}")). This isolated execution context ensures that memory footprints, session caches, and database transactional mappings are cleanly wiped and instantiated on each run, providing absolute test integrity.

Continuous Integration on Bare Metal

By executing tests in isolated subprocesses natively, Zero CMS runs its entire continuous integration suite in milliseconds. We bypass the slow bootstrap overheads of third-party runners, logging colorized terminal assertion successes natively on standard CLI streams.

This subprocess testing paradigm is integrated directly inside our core test runner. Whether verifying multi-tenant active-record isolation, rate-limit middleware throttles, or CSRF handshake validations, the system executes isolated subprocess tests with absolute precision, keeping your development pipeline stable, fast, and optimized on bare metal.