diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 00b8e238b..13561c12b 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -131,6 +131,9 @@ class SapphireTest extends PHPUnit_Framework_TestCase { return self::$is_running_test; } + public static function set_is_running_test($bool) { + self::$is_running_test = $bool; + } /** * Set the manifest to be used to look up test classes by helper functions diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8e4da445d..bd02b154e 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -61,6 +61,8 @@ $controller = new FakeController(); // Get test manifest TestRunner::use_test_manifest(); +SapphireTest::set_is_running_test(true); + // Remove the error handler so that PHPUnit can add its own restore_error_handler();