aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock/cache.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-05-30 16:05:19 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-05-30 16:05:19 +0200
commit3f657bc63e6649da43d860be1848116c42214a65 (patch)
tree1daf983d852b6d926521aa39a0c7bb522d0e7630 /tests/mock/cache.php
parent3d625ab0cf9fe8d1869fbdd66a4602553bb744d4 (diff)
downloadforums-3f657bc63e6649da43d860be1848116c42214a65.tar
forums-3f657bc63e6649da43d860be1848116c42214a65.tar.gz
forums-3f657bc63e6649da43d860be1848116c42214a65.tar.bz2
forums-3f657bc63e6649da43d860be1848116c42214a65.tar.xz
forums-3f657bc63e6649da43d860be1848116c42214a65.zip
[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
Diffstat (limited to 'tests/mock/cache.php')
-rw-r--r--tests/mock/cache.php15
1 files changed, 15 insertions, 0 deletions
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;