From bf20d59cb80050d57fd7ea1baeefef9ec18dc46c Mon Sep 17 00:00:00 2001 From: Russell Michell Date: Thu, 9 Nov 2017 15:39:20 +1300 Subject: [PATCH] FIX: Fixes SapphireTest masking userland coding errors. --- src/Dev/SapphireTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Dev/SapphireTest.php b/src/Dev/SapphireTest.php index 0c3fec858..8b4cc28cc 100644 --- a/src/Dev/SapphireTest.php +++ b/src/Dev/SapphireTest.php @@ -343,12 +343,18 @@ class SapphireTest extends PHPUnit_Framework_TestCase implements TestOnly * - Custom state helpers * * User code should call parent::setUpBeforeClass() before custom setup code + * + * @throws Exception */ public static function setUpBeforeClass() { // Start tests static::start(); + if (!static::$state) { + throw new Exception('SapphireTest failed to bootstrap!'); + } + // Call state helpers static::$state->setUpOnce(static::class);