From 22e0d5bcb7d7ed065f0ea10e900c83ad625bd498 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Thu, 9 May 2024 14:02:40 -0400 Subject: [PATCH] Ensure that when a projects installation fails it also fails the unit test (#540) * Ensure that when a projects installation fails it also fails the unit test * CHANGELOG --- CHANGELOG.md | 1 + src/mantle/testing/class-utils.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd955666..20e32aed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Fixed - Fixed issue with command jobs not working properly. +- Ensure that unit tests fail when a project's installation script fails. ## v1.0.7 - 2024-04-29 diff --git a/src/mantle/testing/class-utils.php b/src/mantle/testing/class-utils.php index 341526d1..17144f68 100644 --- a/src/mantle/testing/class-utils.php +++ b/src/mantle/testing/class-utils.php @@ -500,5 +500,7 @@ public static function handle_shutdown(): void { static::error( '🚨 Error during test run:', 'Shutdown' ); static::code( $error ); + + exit( 1 ); } }