MDL-48197 testing: Always set up a mail sink for mail redirection

Rather than setting noemailever in the bootstrap, this sets up a default
phpmailer message sink which will catch all messages.

Tests which require the phpmailer sink will continue to work as before
without change, though the noemailever config setting no longer needs to
be altered.

For tests wanting to test with noemailever set with the previous behaviour,
they will need to load the message sink and then close it.
This commit is contained in:
Andrew Nicols
2014-11-19 09:09:49 +08:00
parent a74d4743e1
commit 556e3a9e8a
3 changed files with 13 additions and 7 deletions
-2
View File
@@ -209,8 +209,6 @@ error_reporting($CFG->debug);
ini_set('display_errors', '1');
ini_set('log_errors', '1');
$CFG->noemailever = true; // better not mail anybody from tests, override temporarily if necessary
// some ugly hacks
$CFG->themerev = 1;
$CFG->jsrev = 1;