Many tests directly access $wgHooks in order to manipulate the state of hooks for their tests to run properly.
We should replace all the tests that directly access $wgHooks with methods from MediaWikiIntegrationTestCase to achieve the same thing. The useful methods would be: clearHook(), clearAllHooks(), and setTemporaryHook().
Description
Description