Merge pull request #7581 from phptek/sapphiretest-stateisnull2

FIX: Fixes SapphireTest masking userland coding errors.
This commit is contained in:
Damian Mooyman 2017-11-09 17:55:56 +13:00 committed by GitHub
commit a34e802050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);