mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/11579] Rework calls to validate_data_helper
PHPBB3-11579
This commit is contained in:
parent
c2bc82ebfd
commit
11678678b8
10 changed files with 344 additions and 232 deletions
|
@ -20,19 +20,17 @@ class phpbb_functions_validate_data_helper extends PHPUnit_Framework_TestCase
|
||||||
* Test provided input data with supplied checks and compare to expected
|
* Test provided input data with supplied checks and compare to expected
|
||||||
* results
|
* results
|
||||||
*
|
*
|
||||||
* @param array $expected Array containing the expected results. Either
|
* @param array $data Array containing one or more subarrays with the
|
||||||
* an array containing the error message or the an empty
|
* test data. The first element of a subarray is the
|
||||||
* array if input is correct
|
* expected result, the second one is the input, and the
|
||||||
* @param array $input Input data with specific array keys that need to
|
* third is the data that should be passed to the function
|
||||||
* be matched by the ones in the other 2 params
|
* validate_data().
|
||||||
* @param array $validate_check Array containing validate_data check
|
|
||||||
* settings, i.e. array('foobar' => array('string'))
|
|
||||||
*/
|
*/
|
||||||
public function assert_validate_data($expected, $input, $validate_check)
|
public function assert_valid_data($data)
|
||||||
{
|
{
|
||||||
foreach ($input as $key => $data)
|
foreach ($data as $key => $test)
|
||||||
{
|
{
|
||||||
$this->test_case->assertEquals($expected[$key], validate_data(array($data), array($validate_check[$key])));
|
$this->test_case->assertEquals($test[0], validate_data(array($test[1]), array($test[2])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,44 +23,60 @@ class phpbb_functions_validate_date_test extends phpbb_test_case
|
||||||
|
|
||||||
public function test_validate_date()
|
public function test_validate_date()
|
||||||
{
|
{
|
||||||
$this->helper->assert_validate_data(array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty' => array('INVALID'),
|
'empty' => array(
|
||||||
'empty_opt' => array(),
|
array('INVALID'),
|
||||||
'double_single' => array(),
|
'',
|
||||||
'single_single' => array(),
|
array('date'),
|
||||||
'double_double' => array(),
|
),
|
||||||
|
'empty_opt' => array(
|
||||||
|
array(),
|
||||||
|
'',
|
||||||
|
array('date', true),
|
||||||
|
),
|
||||||
|
'double_single' => array(
|
||||||
|
array(),
|
||||||
|
'17-06-1990',
|
||||||
|
array('date'),
|
||||||
|
),
|
||||||
|
'single_single' => array(
|
||||||
|
array(),
|
||||||
|
'05-05-2009',
|
||||||
|
array('date'),
|
||||||
|
),
|
||||||
|
'double_double' => array(
|
||||||
|
array(),
|
||||||
|
'17-12-1990',
|
||||||
|
array('date'),
|
||||||
|
),
|
||||||
|
'month_high' => array(
|
||||||
|
array('INVALID'),
|
||||||
|
'17-17-1990',
|
||||||
|
array('date'),
|
||||||
|
),
|
||||||
|
'month_low' => array(
|
||||||
|
array('INVALID'),
|
||||||
|
'01-00-1990',
|
||||||
|
array('date'),
|
||||||
|
),
|
||||||
|
'day_high' => array(
|
||||||
|
array('INVALID'),
|
||||||
|
'64-01-1990',
|
||||||
|
array('date'),
|
||||||
|
),
|
||||||
|
'day_low' => array(
|
||||||
|
array('INVALID'),
|
||||||
|
'00-12-1990',
|
||||||
|
array('date'),
|
||||||
|
),
|
||||||
// Currently fails
|
// Currently fails
|
||||||
//'zero_year' => array(),
|
/*
|
||||||
'month_high' => array('INVALID'),
|
'zero_year' => array(
|
||||||
'month_low' => array('INVALID'),
|
array(),
|
||||||
'day_high' => array('INVALID'),
|
'01-01-0000',
|
||||||
'day_low' => array('INVALID'),
|
array('date'),
|
||||||
),
|
),
|
||||||
array(
|
*/
|
||||||
'empty' => '',
|
|
||||||
'empty_opt' => '',
|
|
||||||
'double_single' => '17-06-1990',
|
|
||||||
'single_single' => '05-05-2009',
|
|
||||||
'double_double' => '17-12-1990',
|
|
||||||
// Currently fails
|
|
||||||
//'zero_year' => '01-01-0000',
|
|
||||||
'month_high' => '17-17-1990',
|
|
||||||
'month_low' => '01-00-1990',
|
|
||||||
'day_high' => '64-01-1990',
|
|
||||||
'day_low' => '00-12-1990',
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'empty' => array('date'),
|
|
||||||
'empty_opt' => array('date', true),
|
|
||||||
'double_single' => array('date'),
|
|
||||||
'single_single' => array('date'),
|
|
||||||
'double_double' => array('date'),
|
|
||||||
// Currently fails
|
|
||||||
//'zero_year' => array('date'),
|
|
||||||
'month_high' => array('date'),
|
|
||||||
'month_low' => array('date'),
|
|
||||||
'day_high' => array('date'),
|
|
||||||
'day_low' => array('date'),
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,32 +41,42 @@ class phpbb_functions_validate_email_test extends phpbb_database_test_case
|
||||||
$user = $this->user;
|
$user = $this->user;
|
||||||
$user->optionset('banned_users', array('banned@example.com'));
|
$user->optionset('banned_users', array('banned@example.com'));
|
||||||
|
|
||||||
$this->helper->assert_validate_data(array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty' => array(),
|
'empty' => array(
|
||||||
'allowed' => array(),
|
array(),
|
||||||
'invalid' => array('EMAIL_INVALID'),
|
'',
|
||||||
'valid_complex' => array(),
|
array('email'),
|
||||||
'taken' => array('EMAIL_TAKEN'),
|
),
|
||||||
'banned' => array('EMAIL_BANNED'),
|
'allowed' => array(
|
||||||
'no_mx' => array('DOMAIN_NO_MX_RECORD'),
|
array(),
|
||||||
),
|
'foobar@example.com',
|
||||||
array(
|
array('email', 'foobar@example.com'),
|
||||||
'empty' => '',
|
),
|
||||||
'allowed' => 'foobar@example.com',
|
'invalid' => array(
|
||||||
'invalid' => 'fööbar@example.com',
|
array('EMAIL_INVALID'),
|
||||||
'valid_complex' => "'%$~test@example.com",
|
'fööbar@example.com',
|
||||||
'taken' => 'admin@example.com',
|
array('email'),
|
||||||
'banned' => 'banned@example.com',
|
),
|
||||||
'no_mx' => 'test@wwrrrhhghgghgh.ttv',
|
'valid_complex' => array(
|
||||||
),
|
array(),
|
||||||
array(
|
"'%$~test@example.com",
|
||||||
'empty' => array('email'),
|
array('email'),
|
||||||
'allowed' => array('email', 'foobar@example.com'),
|
),
|
||||||
'invalid' => array('email'),
|
'taken' => array(
|
||||||
'valid_complex' => array('email'),
|
array('EMAIL_TAKEN'),
|
||||||
'taken' => array('email'),
|
'admin@example.com',
|
||||||
'banned' => array('email'),
|
array('email'),
|
||||||
'no_mx' => array('email'),
|
),
|
||||||
|
'banned' => array(
|
||||||
|
array('EMAIL_BANNED'),
|
||||||
|
'banned@example.com',
|
||||||
|
array('email'),
|
||||||
|
),
|
||||||
|
'no_mx' => array(
|
||||||
|
array('DOMAIN_NO_MX_RECORD'),
|
||||||
|
'test@wwrrrhhghgghgh.ttv',
|
||||||
|
array('email'),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,41 +23,57 @@ class phpbb_functions_validate_jabber_test extends phpbb_test_case
|
||||||
|
|
||||||
public function test_validate_jabber()
|
public function test_validate_jabber()
|
||||||
{
|
{
|
||||||
$this->helper->assert_validate_data(array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty' => array(),
|
'empty' => array(
|
||||||
'no_seperator' => array('WRONG_DATA'),
|
array(),
|
||||||
'no_user' => array('WRONG_DATA'),
|
'',
|
||||||
'no_realm' => array('WRONG_DATA'),
|
array('jabber'),
|
||||||
'dot_realm' => array('WRONG_DATA'),
|
),
|
||||||
'-realm' => array('WRONG_DATA'),
|
'no_seperator' => array(
|
||||||
'realm-' => array('WRONG_DATA'),
|
array('WRONG_DATA'),
|
||||||
'correct' => array(),
|
'testjabber.ccc',
|
||||||
'prohibited' => array('WRONG_DATA'),
|
array('jabber'),
|
||||||
'prohibited_char' => array('WRONG_DATA'),
|
),
|
||||||
),
|
'no_user' => array(
|
||||||
array(
|
array('WRONG_DATA'),
|
||||||
'empty' => '',
|
'@jabber.ccc',
|
||||||
'no_seperator' => 'testjabber.ccc',
|
array('jabber'),
|
||||||
'no_user' => '@jabber.ccc',
|
),
|
||||||
'no_realm' => 'user@',
|
'no_realm' => array(
|
||||||
'dot_realm' => 'user@.....',
|
array('WRONG_DATA'),
|
||||||
'-realm' => 'user@-jabber.ccc',
|
'user@',
|
||||||
'realm-' => 'user@jabber.ccc-',
|
array('jabber'),
|
||||||
'correct' => 'user@jabber.09A-z.org',
|
),
|
||||||
'prohibited' => 'u@ser@jabber.ccc.org',
|
'dot_realm' => array(
|
||||||
'prohibited_char' => 'u<s>er@jabber.ccc.org',
|
array('WRONG_DATA'),
|
||||||
),
|
'user@.....',
|
||||||
array(
|
array('jabber'),
|
||||||
'empty' => array('jabber'),
|
),
|
||||||
'no_seperator' => array('jabber'),
|
'-realm' => array(
|
||||||
'no_user' => array('jabber'),
|
array('WRONG_DATA'),
|
||||||
'no_realm' => array('jabber'),
|
'user@-jabber.ccc',
|
||||||
'dot_realm' => array('jabber'),
|
array('jabber'),
|
||||||
'-realm' => array('jabber'),
|
),
|
||||||
'realm-' => array('jabber'),
|
'realm-' => array(
|
||||||
'correct' => array('jabber'),
|
array('WRONG_DATA'),
|
||||||
'prohibited' => array('jabber'),
|
'user@jabber.ccc-',
|
||||||
'prohibited_char' => array('jabber'),
|
array('jabber'),
|
||||||
|
),
|
||||||
|
'correct' => array(
|
||||||
|
array(),
|
||||||
|
'user@jabber.09A-z.org',
|
||||||
|
array('jabber'),
|
||||||
|
),
|
||||||
|
'prohibited' => array(
|
||||||
|
array('WRONG_DATA'),
|
||||||
|
'u@ser@jabber.ccc.org',
|
||||||
|
array('jabber'),
|
||||||
|
),
|
||||||
|
'prohibited_char' => array(
|
||||||
|
array('WRONG_DATA'),
|
||||||
|
'u<s>er@jabber.ccc.org',
|
||||||
|
array('jabber'),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,23 +34,27 @@ class phpbb_functions_validate_lang_iso_test extends phpbb_database_test_case
|
||||||
|
|
||||||
$db = $this->db;
|
$db = $this->db;
|
||||||
|
|
||||||
$this->helper->assert_validate_data(array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty' => array('WRONG_DATA'),
|
'empty' => array(
|
||||||
'en' => array(),
|
array('WRONG_DATA'),
|
||||||
'cs' => array(),
|
'',
|
||||||
'de' => array('WRONG_DATA'),
|
array('language_iso_name'),
|
||||||
),
|
),
|
||||||
array(
|
'en' => array(
|
||||||
'empty' => '',
|
array(),
|
||||||
'en' => 'en',
|
'en',
|
||||||
'cs' => 'cs',
|
array('language_iso_name'),
|
||||||
'de' => 'de',
|
),
|
||||||
),
|
'cs' => array(
|
||||||
array(
|
array(),
|
||||||
'empty' => array('language_iso_name'),
|
'cs',
|
||||||
'en' => array('language_iso_name'),
|
array('language_iso_name'),
|
||||||
'cs' => array('language_iso_name'),
|
),
|
||||||
'de' => array('language_iso_name'),
|
'de' => array(
|
||||||
|
array('WRONG_DATA'),
|
||||||
|
'de',
|
||||||
|
array('language_iso_name'),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,23 +23,27 @@ class phpbb_functions_validate_match_test extends phpbb_test_case
|
||||||
|
|
||||||
public function test_validate_match()
|
public function test_validate_match()
|
||||||
{
|
{
|
||||||
$this->helper->assert_validate_data(array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty_opt' => array(),
|
'empty_opt' => array(
|
||||||
'empty_empty_match' => array(),
|
array(),
|
||||||
'foobar' => array(),
|
'',
|
||||||
'foobar_fail' => array('WRONG_DATA'),
|
array('match', true, '/[a-z]$/'),
|
||||||
),
|
),
|
||||||
array(
|
'empty_empty_match' => array(
|
||||||
'empty_opt' => '',
|
array(),
|
||||||
'empty_empty_match' => '',
|
'',
|
||||||
'foobar' => 'foobar',
|
array('match'),
|
||||||
'foobar_fail' => 'foobar123',
|
),
|
||||||
),
|
'foobar' => array(
|
||||||
array(
|
array(),
|
||||||
'empty_opt' => array('match', true, '/[a-z]$/'),
|
'foobar',
|
||||||
'empty_empty_match' => array('match'),
|
array('match', false, '/[a-z]$/'),
|
||||||
'foobar' => array('match', false, '/[a-z]$/'),
|
),
|
||||||
'foobar_fail' => array('match', false, '/[a-z]$/'),
|
'foobar_fail' => array(
|
||||||
|
array('WRONG_DATA'),
|
||||||
|
'foobar123',
|
||||||
|
array('match', false, '/[a-z]$/'),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,29 +23,37 @@ class phpbb_functions_validate_num_test extends phpbb_test_case
|
||||||
|
|
||||||
public function test_validate_num()
|
public function test_validate_num()
|
||||||
{
|
{
|
||||||
$this->helper->assert_validate_data(array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty' => array(),
|
'empty' => array(
|
||||||
'zero' => array(),
|
array(),
|
||||||
'five_minmax_correct' => array(),
|
'',
|
||||||
'five_minmax_short' => array('TOO_SMALL'),
|
array('num'),
|
||||||
'five_minmax_long' => array('TOO_LARGE'),
|
),
|
||||||
'string' => array(),
|
'zero' => array(
|
||||||
),
|
array(),
|
||||||
array(
|
'0',
|
||||||
'empty' => '',
|
array('num'),
|
||||||
'zero' => 0,
|
),
|
||||||
'five_minmax_correct' => 5,
|
'five_minmax_correct' => array(
|
||||||
'five_minmax_short' => 5,
|
array(),
|
||||||
'five_minmax_long' => 5,
|
'5',
|
||||||
'string' => 'foobar',
|
array('num', false, 2, 6),
|
||||||
),
|
),
|
||||||
array(
|
'five_minmax_short' => array(
|
||||||
'empty' => array('num'),
|
array('TOO_SMALL'),
|
||||||
'zero' => array('num'),
|
'5',
|
||||||
'five_minmax_correct' => array('num', false, 2, 6),
|
array('num', false, 7, 10),
|
||||||
'five_minmax_short' => array('num', false, 7, 10),
|
),
|
||||||
'five_minmax_long' => array('num', false, 2, 3),
|
'five_minmax_long' => array(
|
||||||
'string' => array('num'),
|
array('TOO_LARGE'),
|
||||||
|
'5',
|
||||||
|
array('num', false, 2, 3),
|
||||||
|
),
|
||||||
|
'string' => array(
|
||||||
|
array(),
|
||||||
|
'foobar',
|
||||||
|
array('num'),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,19 +65,32 @@ class phpbb_functions_validate_password_test extends phpbb_test_case
|
||||||
// Set complexity to mixed case letters, numbers and symbols
|
// Set complexity to mixed case letters, numbers and symbols
|
||||||
$config['pass_complex'] = $pass_complexity;
|
$config['pass_complex'] = $pass_complexity;
|
||||||
|
|
||||||
$this->helper->assert_validate_data($expected, array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty' => '',
|
'empty' => array(
|
||||||
'foobar_any' => 'foobar',
|
$expected['empty'],
|
||||||
'foobar_mixed' => 'FooBar',
|
'',
|
||||||
'foobar_alpha' => 'F00bar',
|
array('password'),
|
||||||
'foobar_symbol' => 'fooBar123*',
|
),
|
||||||
),
|
'foobar_any' => array(
|
||||||
array(
|
$expected['foobar_any'],
|
||||||
'empty' => array('password'),
|
'foobar',
|
||||||
'foobar_any' => array('password'),
|
array('password'),
|
||||||
'foobar_mixed' => array('password'),
|
),
|
||||||
'foobar_alpha' => array('password'),
|
'foobar_mixed' => array(
|
||||||
'foobar_symbol' => array('password'),
|
$expected['foobar_mixed'],
|
||||||
|
'FooBar',
|
||||||
|
array('password'),
|
||||||
|
),
|
||||||
|
'foobar_alpha' => array(
|
||||||
|
$expected['foobar_alpha'],
|
||||||
|
'F00bar',
|
||||||
|
array('password'),
|
||||||
|
),
|
||||||
|
'foobar_symbol' => array(
|
||||||
|
$expected['foobar_symbol'],
|
||||||
|
'fooBar123*',
|
||||||
|
array('password'),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,35 +24,47 @@ class phpbb_functions_validate_string_test extends phpbb_test_case
|
||||||
|
|
||||||
public function test_validate_string()
|
public function test_validate_string()
|
||||||
{
|
{
|
||||||
$this->helper->assert_validate_data(array(
|
$this->helper->assert_valid_data(array(
|
||||||
'empty_opt' => array(),
|
'empty_opt' => array(
|
||||||
'empty' => array(),
|
array(),
|
||||||
'foo' => array(),
|
'',
|
||||||
'foo_minmax_correct' => array(),
|
array('string', true),
|
||||||
'foo_minmax_short' => array('TOO_SHORT'),
|
),
|
||||||
'foo_minmax_long' => array('TOO_LONG'),
|
'empty' => array(
|
||||||
'empty_short' => array('TOO_SHORT'),
|
array(),
|
||||||
'empty_length_opt' => array(),
|
'',
|
||||||
),
|
array('string'),
|
||||||
array(
|
),
|
||||||
'empty_opt' => '',
|
'foo' => array(
|
||||||
'empty' => '',
|
array(),
|
||||||
'foo' => 'foobar',
|
'foobar',
|
||||||
'foo_minmax_correct' => 'foobar',
|
array('string'),
|
||||||
'foo_minmax_short' => 'foobar',
|
),
|
||||||
'foo_minmax_long' => 'foobar',
|
'foo_minmax_correct' => array(
|
||||||
'empty_short' => '',
|
array(),
|
||||||
'empty_length_opt' => '',
|
'foobar',
|
||||||
),
|
array('string', false, 2, 6),
|
||||||
array(
|
),
|
||||||
'empty_opt' => array('string', true),
|
'foo_minmax_short' => array(
|
||||||
'empty' => array('string'),
|
array('TOO_SHORT'),
|
||||||
'foo' => array('string'),
|
'foobar',
|
||||||
'foo_minmax_correct' => array('string', false, 2, 6),
|
array('string', false, 7, 9),
|
||||||
'foo_minmax_short' => array('string', false, 7, 9),
|
),
|
||||||
'foo_minmax_long' => array('string', false, 2, 5),
|
'foo_minmax_long' => array(
|
||||||
'empty_short' => array('string', false, 1, 6),
|
array('TOO_LONG'),
|
||||||
'empty_length_opt' => array('string', true, 1, 6),
|
'foobar',
|
||||||
|
array('string', false, 2, 5),
|
||||||
|
),
|
||||||
|
'empty_short' => array(
|
||||||
|
array('TOO_SHORT'),
|
||||||
|
'',
|
||||||
|
array('string', false, 1, 6),
|
||||||
|
),
|
||||||
|
'empty_length_opt' => array(
|
||||||
|
array(),
|
||||||
|
'',
|
||||||
|
array('string', true, 1, 6),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,31 +129,62 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
|
||||||
|
|
||||||
$config['allow_name_chars'] = $allow_name_chars;
|
$config['allow_name_chars'] = $allow_name_chars;
|
||||||
|
|
||||||
$this->helper->assert_validate_data($expected, array(
|
$this->helper->assert_valid_data(array(
|
||||||
'foobar_allow' => 'foobar',
|
'foobar_allow' => array(
|
||||||
'foobar_ascii' => 'foobar',
|
$expected['foobar_allow'],
|
||||||
'foobar_any' => 'f*~*^=oo_bar1',
|
'foobar',
|
||||||
'foobar_alpha' => 'fo0Bar',
|
array('username', 'foobar'),
|
||||||
'foobar_alpha_spacers' => 'Fo0-[B]_a+ R',
|
),
|
||||||
'foobar_letter_num' => 'fo0Bar0',
|
'foobar_ascii' => array(
|
||||||
'foobar_letter_num_sp' => 'Fö0-[B]_a+ R',
|
$expected['foobar_ascii'],
|
||||||
'foobar_quot' => '"foobar"',
|
'foobar',
|
||||||
'barfoo_disallow' => 'barfoo',
|
array('username'),
|
||||||
'admin_taken' => 'admin',
|
),
|
||||||
'group_taken' => 'foobar_group',
|
'foobar_any' => array(
|
||||||
),
|
$expected['foobar_any'],
|
||||||
array(
|
'f*~*^=oo_bar1',
|
||||||
'foobar_allow' => array('username', 'foobar'),
|
array('username'),
|
||||||
'foobar_ascii' => array('username'),
|
),
|
||||||
'foobar_any' => array('username'),
|
'foobar_alpha' => array(
|
||||||
'foobar_alpha' => array('username'),
|
$expected['foobar_alpha'],
|
||||||
'foobar_alpha_spacers' => array('username'),
|
'fo0Bar',
|
||||||
'foobar_letter_num' => array('username'),
|
array('username'),
|
||||||
'foobar_letter_num_sp' => array('username'),
|
),
|
||||||
'foobar_quot' => array('username'),
|
'foobar_alpha_spacers' => array(
|
||||||
'barfoo_disallow' => array('username'),
|
$expected['foobar_alpha_spacers'],
|
||||||
'admin_taken' => array('username'),
|
'Fo0-[B]_a+ R',
|
||||||
'group_taken' => array('username'),
|
array('username'),
|
||||||
|
),
|
||||||
|
'foobar_letter_num' => array(
|
||||||
|
$expected['foobar_letter_num'],
|
||||||
|
'fo0Bar0',
|
||||||
|
array('username'),
|
||||||
|
),
|
||||||
|
'foobar_letter_num_sp' => array(
|
||||||
|
$expected['foobar_letter_num_sp'],
|
||||||
|
'Fö0-[B]_a+ R',
|
||||||
|
array('username'),
|
||||||
|
),
|
||||||
|
'foobar_quot' => array(
|
||||||
|
$expected['foobar_quot'],
|
||||||
|
'"foobar"',
|
||||||
|
array('username'),
|
||||||
|
),
|
||||||
|
'barfoo_disallow' => array(
|
||||||
|
$expected['barfoo_disallow'],
|
||||||
|
'barfoo',
|
||||||
|
array('username'),
|
||||||
|
),
|
||||||
|
'admin_taken' => array(
|
||||||
|
$expected['admin_taken'],
|
||||||
|
'admin',
|
||||||
|
array('username'),
|
||||||
|
),
|
||||||
|
'group_taken' => array(
|
||||||
|
$expected['group_taken'],
|
||||||
|
'foobar_group',
|
||||||
|
array('username'),
|
||||||
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue