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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user