I found this bug during CI of my extension with this patch (Jenkins report), but I was able to verify it is independant of my extension.
When executing PHPUnit with a test where backupGlobals is enabled, there is the following error:
PHP Fatal error: Uncaught ConfigException: MultiConfig::get: undefined option: 'ReadOnly' in /mediawiki/includes/config/MultiConfig.php:57 Stack trace: #0 /mediawiki/includes/ReadOnlyMode.php(98): MultiConfig->get('ReadOnly') #1 /mediawiki/includes/GlobalFunctions.php(1301): ConfiguredReadOnlyMode->getReason() #2 /mediawiki/includes/jobqueue/JobQueueGroup.php(74): wfConfiguredReadOnlyReason() #3 /mediawiki/tests/phpunit/MediaWikiTestCase.php(1077): JobQueueGroup::singleton() #4 /mediawiki/tests/phpunit/bootstrap.php(20): MediaWikiTestCase::teardownTestDB() #5 [internal function]: MediaWikiPHPUnitBootstrap->__destruct() #6 {main} thrown in /mediawiki/includes/config/MultiConfig.php on line 57
This occurs with version 820f4696 (but not with the previous version 0a873ed2) and when $wgReadOnly is not set in LocalSettings.php (so its value is null). This can be tested by copying the basic extension TestGlobals from P5315 and add wfLoadExtension( 'TestGlobals' ); in your LocalSettings.php.