testExecute_email() should unregister the hooks
mailPasswordInternal and SpecialPasswordResetOnSubmit
for proper unit testing.
Bug: T176102
Change-Id: Id7403f57cc9d751ada85b611193c1d8f3503e713
/**
* @group Database
*/
-class PasswordResetTest extends PHPUnit_Framework_TestCase {
+class PasswordResetTest extends MediaWikiTestCase {
/**
* @dataProvider provideIsAllowed
*/
'EnableEmail' => true,
] );
+ // Unregister the hooks for proper unit testing
+ $this->mergeMwGlobalArrayValue( 'wgHooks', [
+ 'mailPasswordInternal' => [],
+ 'SpecialPasswordResetOnSubmit' => [],
+ ] );
+
$authManager = $this->getMockBuilder( AuthManager::class )->disableOriginalConstructor()
->getMock();
$authManager->expects( $this->any() )->method( 'allowsAuthenticationDataChange' )