1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 13:44:12 +02:00

[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
This commit is contained in:
Marc Alexander
2013-05-30 16:05:19 +02:00
parent 3d625ab0cf
commit 3f657bc63e
4 changed files with 375 additions and 62 deletions

View File

@@ -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;