static function bootstrapForTest() { if (self::$coverage_file_path) { xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); } if (self::$coverage_file_path || self::$tests_report_path) { register_shutdown_function(__CLASS__ . '::onShutdown'); } if (self::$tests_report_path) { self::$start_time = microtime(true); } assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_WARNING, 1); assert_options(ASSERT_BAIL, 0); assert_options(ASSERT_CALLBACK, __CLASS__ . '::throwFromAssertion'); /* * Let's not ignore warnings, but fail with an uncaught exception! */ set_error_handler(__CLASS__ . '::throwFromError'); }