The GetPreferences hook lets extensions register additional user
preferences. They show up on the form and that breaks the hardcoded
assertion that exactly 5 preferences are available.
Disable the hook in case the test is run with extensions loaded in (ex:
BetaFeatures).
Change-Id: I78b11e989110407cd721e8a3fbbe81d28ca4be5b
* @covers MediaWiki\Preferences\DefaultPreferencesFactory::getForm()
*/
public function testGetForm() {
+ $this->setTemporaryHook( 'GetPreferences', null );
+
$testUser = $this->getTestUser();
$form = $this->getPreferencesFactory()->getForm( $testUser->getUser(), $this->context );
$this->assertInstanceOf( PreferencesFormLegacy::class, $form );