Merge "(Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiAccountCreationTest.php
index f37e279..af499d1 100644 (file)
@@ -7,8 +7,14 @@
  */
 class ApiCreateAccountTest extends ApiTestCase {
        function setUp() {
+               global $wgHooks;
                parent::setUp();
                LoginForm::setCreateaccountToken();
+
+               $hooks = $wgHooks;
+               Hooks::clear( 'AlternateUserMailer' );
+               $hooks['AlternateUserMailer'] = array( function () { return false; } );
+               $this->setMwGlobals( array( 'wgHooks' => $hooks ) );
        }
 
        /**