Merge "(Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 18 Feb 2013 10:11:04 +0000 (10:11 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 18 Feb 2013 10:11:04 +0000 (10:11 +0000)
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 ) );
        }
 
        /**