From: Platonides Date: Thu, 28 Feb 2013 22:16:29 +0000 (-0800) Subject: (Bug 44192) Do not attempt to send a real e-mail X-Git-Tag: 1.31.0-rc.0~20524^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=9cd81e4c14050a9ee5d32d83bf2c303968f05870;p=lhc%2Fweb%2Fwiklou.git (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 --- 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() {