Merge branch 'MDL-69600-divertemails' of https://github.com/brendanheywood/moodle

This commit is contained in:
Jun Pataleta 2020-09-29 20:28:05 +08:00
commit 83cf43b045
4 changed files with 41 additions and 1 deletions

View file

@ -3297,6 +3297,26 @@ class core_moodlelib_testcase extends advanced_testcase {
),
false,
),
'divertsexceptionsnewline' => array(
'divertallemailsto' => 'somewhere@elsewhere.com',
'divertallemailsexcept' => "@dev.com\nfred(\+.*)?@example.com",
array(
'dev1@dev.com',
'fred@example.com',
'fred+verp@example.com',
),
false,
),
'alsodivertsnewline' => array(
'divertallemailsto' => 'somewhere@elsewhere.com',
'divertallemailsexcept' => "@dev.com\nfred(\+.*)?@example.com",
array(
'foo@example.com',
'test@real.com',
'fred.jones@example.com',
),
true,
),
);
}