aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/validate_user_email_test.php
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2019-10-28 21:11:42 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2019-10-28 21:11:42 +0100
commitd136a8a9078b02433f4be08420486ad05c8129bd (patch)
tree4d3c720253ed2edef075bec7152a0ce66db16e10 /tests/functions/validate_user_email_test.php
parent41728f2258c409480b9c3d4c1753b6eb1b47c677 (diff)
parente95e387188b050c163edcce3141c957d259810c9 (diff)
downloadforums-d136a8a9078b02433f4be08420486ad05c8129bd.tar
forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.gz
forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.bz2
forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.xz
forums-d136a8a9078b02433f4be08420486ad05c8129bd.zip
Merge branch '3.2.x' into ticket/16153
Diffstat (limited to 'tests/functions/validate_user_email_test.php')
-rw-r--r--tests/functions/validate_user_email_test.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/functions/validate_user_email_test.php b/tests/functions/validate_user_email_test.php
index 8dcec88103..d23ffc0503 100644
--- a/tests/functions/validate_user_email_test.php
+++ b/tests/functions/validate_user_email_test.php
@@ -28,10 +28,16 @@ class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
protected function setUp()
{
+ global $cache, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
+
parent::setUp();
+ $cache = new \phpbb\cache\driver\file();
+ $cache->purge();
$this->db = $this->new_dbal();
- $this->user = new phpbb_mock_user;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $language = new phpbb\language\language(new phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
+ $this->user = new phpbb\user($language, '\phpbb\datetime');
$this->helper = new phpbb_functions_validate_data_helper($this);
}
@@ -47,7 +53,6 @@ class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
$config['email_check_mx'] = $check_mx;
$db = $this->db;
$user = $this->user;
- $user->optionset('banned_users', array('banned@example.com'));
}
public static function validate_user_email_data()
@@ -58,7 +63,8 @@ class phpbb_functions_validate_user_email_test extends phpbb_database_test_case
array('valid_complex', array(), "'%$~test@example.com"),
array('invalid', array('EMAIL_INVALID'), 'fööbar@example.com'),
array('taken', array('EMAIL_TAKEN'), 'admin@example.com'),
- array('banned', array('EMAIL_BANNED'), 'banned@example.com'),
+ array('banned', ['just because'], 'banned2@example.com'),
+ array('banned', ['EMAIL_BANNED'], 'banned@example.com')
);
}