FIX: Fixes SapphireTest masking userland coding errors.

This commit is contained in:
Russell Michell 2017-11-09 15:39:20 +13:00
parent f1865cc798
commit bf20d59cb8

View File

@ -343,12 +343,18 @@ class SapphireTest extends PHPUnit_Framework_TestCase implements TestOnly
* - Custom state helpers * - Custom state helpers
* *
* User code should call parent::setUpBeforeClass() before custom setup code * User code should call parent::setUpBeforeClass() before custom setup code
*
* @throws Exception
*/ */
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
// Start tests // Start tests
static::start(); static::start();
if (!static::$state) {
throw new Exception('SapphireTest failed to bootstrap!');
}
// Call state helpers // Call state helpers
static::$state->setUpOnce(static::class); static::$state->setUpOnce(static::class);