aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/validate_jabber_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_jabber_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_jabber_test.php')
-rw-r--r--tests/functions/validate_jabber_test.php86
1 files changed, 51 insertions, 35 deletions
diff --git a/tests/functions/validate_jabber_test.php b/tests/functions/validate_jabber_test.php
index 551b243f81..5a53c963bd 100644
--- a/tests/functions/validate_jabber_test.php
+++ b/tests/functions/validate_jabber_test.php
@@ -23,41 +23,57 @@ class phpbb_functions_validate_jabber_test extends phpbb_test_case
public function test_validate_jabber()
{
- $this->helper->assert_validate_data(array(
- 'empty' => array(),
- 'no_seperator' => array('WRONG_DATA'),
- 'no_user' => array('WRONG_DATA'),
- 'no_realm' => array('WRONG_DATA'),
- 'dot_realm' => array('WRONG_DATA'),
- '-realm' => array('WRONG_DATA'),
- 'realm-' => array('WRONG_DATA'),
- 'correct' => array(),
- 'prohibited' => array('WRONG_DATA'),
- 'prohibited_char' => array('WRONG_DATA'),
- ),
- array(
- 'empty' => '',
- 'no_seperator' => 'testjabber.ccc',
- 'no_user' => '@jabber.ccc',
- 'no_realm' => 'user@',
- 'dot_realm' => 'user@.....',
- '-realm' => 'user@-jabber.ccc',
- 'realm-' => 'user@jabber.ccc-',
- 'correct' => 'user@jabber.09A-z.org',
- 'prohibited' => 'u@ser@jabber.ccc.org',
- 'prohibited_char' => 'u<s>er@jabber.ccc.org',
- ),
- array(
- 'empty' => array('jabber'),
- 'no_seperator' => array('jabber'),
- 'no_user' => array('jabber'),
- 'no_realm' => array('jabber'),
- 'dot_realm' => array('jabber'),
- '-realm' => array('jabber'),
- 'realm-' => array('jabber'),
- 'correct' => array('jabber'),
- 'prohibited' => array('jabber'),
- 'prohibited_char' => array('jabber'),
+ $this->helper->assert_valid_data(array(
+ 'empty' => array(
+ array(),
+ '',
+ array('jabber'),
+ ),
+ 'no_seperator' => array(
+ array('WRONG_DATA'),
+ 'testjabber.ccc',
+ array('jabber'),
+ ),
+ 'no_user' => array(
+ array('WRONG_DATA'),
+ '@jabber.ccc',
+ array('jabber'),
+ ),
+ 'no_realm' => array(
+ array('WRONG_DATA'),
+ 'user@',
+ array('jabber'),
+ ),
+ 'dot_realm' => array(
+ array('WRONG_DATA'),
+ 'user@.....',
+ array('jabber'),
+ ),
+ '-realm' => array(
+ array('WRONG_DATA'),
+ 'user@-jabber.ccc',
+ array('jabber'),
+ ),
+ 'realm-' => array(
+ array('WRONG_DATA'),
+ 'user@jabber.ccc-',
+ 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'),
+ ),
));
}
}