jenkins-bot has submitted this change and it was merged.

Change subject: (Bug 44192) Do not attempt to send a real e-mail in 
ApiAccountCreationTest
......................................................................


(Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest

Change-Id: I6e9f45a51a27bdaf2bf62722f840ddc4755931aa
---
M tests/phpunit/includes/api/ApiAccountCreationTest.php
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Parent5446: Looks good to me, but someone else must approve
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified

Objections:
  Hashar: There's a problem with this change, please improve



diff --git a/tests/phpunit/includes/api/ApiAccountCreationTest.php 
b/tests/phpunit/includes/api/ApiAccountCreationTest.php
index 60f6537..4fbbc27 100644
--- a/tests/phpunit/includes/api/ApiAccountCreationTest.php
+++ b/tests/phpunit/includes/api/ApiAccountCreationTest.php
@@ -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 ) );
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/48247
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e9f45a51a27bdaf2bf62722f840ddc4755931aa
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Platonides <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Platonides <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to