Skip to content
sean fisher

wordpress / laravel / ai

writing

Notes from the build log

Long-form notes on WordPress at scale, PHP tooling, and the unglamorous work of keeping large publishing systems boring.

2 posts · 0 links · rss · search

You can't test code that calls exit()

Sep 3rd 2026 · 7 min · wordpress, Testing, Mantle

PHP's exit construct stops the process before your assertions can run. Mantle Testkit's terminate_request() preserves the same terminal behavior while turning the response into something your tests can inspect.