aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/validate_username_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-06-03 21:30:13 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-06-03 21:30:13 +0200
commit11678678b810c26376728166cf334550cbc30124 (patch)
tree4811af80294223ca68195ee0d27e99be2761ff9a /tests/functions/validate_username_test.php
parentc2bc82ebfd54cebba03bd04dccaf5a8e317844ae (diff)
downloadforums-11678678b810c26376728166cf334550cbc30124.tar
forums-11678678b810c26376728166cf334550cbc30124.tar.gz
forums-11678678b810c26376728166cf334550cbc30124.tar.bz2
forums-11678678b810c26376728166cf334550cbc30124.tar.xz
forums-11678678b810c26376728166cf334550cbc30124.zip
[ticket/11579] Rework calls to validate_data_helper
PHPBB3-11579
Diffstat (limited to 'tests/functions/validate_username_test.php')
-rw-r--r--tests/functions/validate_username_test.php81
1 files changed, 56 insertions, 25 deletions
diff --git a/tests/functions/validate_username_test.php b/tests/functions/validate_username_test.php
index 92c5ba6ee1..9adfb63812 100644
--- a/tests/functions/validate_username_test.php
+++ b/tests/functions/validate_username_test.php
@@ -129,31 +129,62 @@ class phpbb_functions_validate_data_test extends phpbb_database_test_case
$config['allow_name_chars'] = $allow_name_chars;
- $this->helper->assert_validate_data($expected, array(
- 'foobar_allow' => 'foobar',
- 'foobar_ascii' => 'foobar',
- 'foobar_any' => 'f*~*^=oo_bar1',
- 'foobar_alpha' => 'fo0Bar',
- 'foobar_alpha_spacers' => 'Fo0-[B]_a+ R',
- 'foobar_letter_num' => 'fo0Bar0',
- 'foobar_letter_num_sp' => 'Fö0-[B]_a+ R',
- 'foobar_quot' => '"foobar"',
- 'barfoo_disallow' => 'barfoo',
- 'admin_taken' => 'admin',
- 'group_taken' => 'foobar_group',
- ),
- array(
- 'foobar_allow' => array('username', 'foobar'),
- 'foobar_ascii' => array('username'),
- 'foobar_any' => array('username'),
- 'foobar_alpha' => array('username'),
- 'foobar_alpha_spacers' => array('username'),
- 'foobar_letter_num' => array('username'),
- 'foobar_letter_num_sp' => array('username'),
- 'foobar_quot' => array('username'),
- 'barfoo_disallow' => array('username'),
- 'admin_taken' => array('username'),
- 'group_taken' => array('username'),
+ $this->helper->assert_valid_data(array(
+ 'foobar_allow' => array(
+ $expected['foobar_allow'],
+ 'foobar',
+ array('username', 'foobar'),
+ ),
+ 'foobar_ascii' => array(
+ $expected['foobar_ascii'],
+ 'foobar',
+ array('username'),
+ ),
+ 'foobar_any' => array(
+ $expected['foobar_any'],
+ 'f*~*^=oo_bar1',
+ array('username'),
+ ),
+ 'foobar_alpha' => array(
+ $expected['foobar_alpha'],
+ 'fo0Bar',
+ array('username'),
+ ),
+ 'foobar_alpha_spacers' => array(
+ $expected['foobar_alpha_spacers'],
+ 'Fo0-[B]_a+ R',
+ 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'),
+ ),
));
}
}