overrideConfigValue( MainConfigNames::AllowSchemaUpdates, false ); $this->expectCallToFatalError(); $this->expectOutputRegex( '/Do not run update\.php on this wiki/' ); $this->maintenance->execute(); } public function testExecuteWhenUsingInvalidConfig() { // Set wgAutoCreateTempUser to true to simulate that an invalid config has been set in LocalSettings.php. // wgAutoCreateTempUser should normally be an array and a boolean value is invalid for this configuration. $this->overrideConfigValue( MainConfigNames::AutoCreateTempUser, true ); $this->expectCallToFatalError(); $this->expectOutputRegex( '/Some of your configuration settings caused a warning[\s\S]*AutoCreateTempUser/' ); $this->maintenance->execute(); } }