From 2025a89d5bcc513826428529ed191aa781942419 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 9 Feb 2013 18:54:48 +0100 Subject: [PATCH] (Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest Change-Id: I6e9f45a51a27bdaf2bf62722f840ddc4755931aa --- tests/phpunit/includes/api/ApiAccountCreationTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/phpunit/includes/api/ApiAccountCreationTest.php b/tests/phpunit/includes/api/ApiAccountCreationTest.php index 60f65371c2..4fbbc27aaa 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 ) ); } /** -- 2.20.1