mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7581 from phptek/sapphiretest-stateisnull2
FIX: Fixes SapphireTest masking userland coding errors.
This commit is contained in:
commit
a34e802050
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user