From 9cd81e4c14050a9ee5d32d83bf2c303968f05870 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 28 Feb 2013 14:16:29 -0800 Subject: [PATCH] (Bug 44192) Do not attempt to send a real e-mail The ApiAccountCreationTest is attempting to send an email to the newly created user. The tests should really never send any email. This patch register a noop callback for the 'AlternateUserMailer' hook which would disable email entirely in our test suite. This is generic version of 2025a89 which was only disabling mail for the ApiAccountCreationTest test and that Antoine reverted. Change-Id: I7b3ba4f7563a5818c988d6f8da165cc3c984f160 --- tests/phpunit/phpunit.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php index cce5dde5ae..2ec0744069 100755 --- a/tests/phpunit/phpunit.php +++ b/tests/phpunit/phpunit.php @@ -47,6 +47,12 @@ class PHPUnitMaintClass extends Maintenance { $wgLocaltimezone = 'UTC'; $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null'; + + // Bug 44192 Do not attempt to send a real e-mail + Hooks::clear( 'AlternateUserMailer' ); + Hooks::register( 'AlternateUserMailer', + function() { return false; } + ); } public function execute() { -- 2.20.1