(Bug 44192) Do not attempt to send a real e-mail in ApiAccountCreationTest
authorPlatonides <platonides@gmail.com>
Sat, 9 Feb 2013 17:54:48 +0000 (18:54 +0100)
committerPlatonides <platonides@gmail.com>
Sat, 9 Feb 2013 21:47:33 +0000 (22:47 +0100)
Change-Id: I6e9f45a51a27bdaf2bf62722f840ddc4755931aa

tests/phpunit/includes/api/ApiAccountCreationTest.php

index 60f6537..4fbbc27 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 ) );
        }
 
        /**