From: Platonides Date: Sat, 9 Feb 2013 17:54:48 +0000 (+0100) Subject: (Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest X-Git-Tag: 1.31.0-rc.0~20658^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=2025a89d5bcc513826428529ed191aa781942419;p=lhc%2Fweb%2Fwiklou.git (Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest Change-Id: I6e9f45a51a27bdaf2bf62722f840ddc4755931aa --- 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 ) ); } /**