This is not a workaround. This is how one accesses MediaWiki config, not a lot the code can do about that. The one thing that minimizes the evil and is done here is not accessing the globals from the class itself but requiring an array, and having the user pass in the globals. That at least makes testing less insane.