From 3f657bc63e6649da43d860be1848116c42214a65 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 30 May 2013 16:05:19 +0200 Subject: [ticket/11579] Add remaining unit tests for validate_data functions This now includes tests for usernames, passwords, emails, and jabber addresses. A few small changes had to be applied to phpbb_mock_cache and phpbb_mock_user in order to incorporate needed methods. PHPBB3-11579 --- tests/mock/cache.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/mock/cache.php') diff --git a/tests/mock/cache.php b/tests/mock/cache.php index aa0db5ab20..acf4288319 100644 --- a/tests/mock/cache.php +++ b/tests/mock/cache.php @@ -74,6 +74,21 @@ class phpbb_mock_cache ); } + /** + * Obtain disallowed usernames. Input data via standard put method. + */ + public function obtain_disallowed_usernames() + { + if (($usernames = $this->get('_disallowed_usernames')) !== false) + { + return $usernames; + } + else + { + return array(); + } + } + public function set_bots($bots) { $this->data['_bots'] = $bots; -- cgit v1.2.1