aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/validate_string_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_string_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_string_test.php')
-rw-r--r--tests/functions/validate_string_test.php70
1 files changed, 41 insertions, 29 deletions
diff --git a/tests/functions/validate_string_test.php b/tests/functions/validate_string_test.php
index 2b4f7321a6..ab44c28541 100644
--- a/tests/functions/validate_string_test.php
+++ b/tests/functions/validate_string_test.php
@@ -24,35 +24,47 @@ class phpbb_functions_validate_string_test extends phpbb_test_case
public function test_validate_string()
{
- $this->helper->assert_validate_data(array(
- 'empty_opt' => array(),
- 'empty' => array(),
- 'foo' => array(),
- 'foo_minmax_correct' => array(),
- 'foo_minmax_short' => array('TOO_SHORT'),
- 'foo_minmax_long' => array('TOO_LONG'),
- 'empty_short' => array('TOO_SHORT'),
- 'empty_length_opt' => array(),
- ),
- array(
- 'empty_opt' => '',
- 'empty' => '',
- 'foo' => 'foobar',
- 'foo_minmax_correct' => 'foobar',
- 'foo_minmax_short' => 'foobar',
- 'foo_minmax_long' => 'foobar',
- 'empty_short' => '',
- 'empty_length_opt' => '',
- ),
- array(
- 'empty_opt' => array('string', true),
- 'empty' => array('string'),
- 'foo' => array('string'),
- 'foo_minmax_correct' => array('string', false, 2, 6),
- 'foo_minmax_short' => array('string', false, 7, 9),
- 'foo_minmax_long' => array('string', false, 2, 5),
- 'empty_short' => array('string', false, 1, 6),
- 'empty_length_opt' => array('string', true, 1, 6),
+ $this->helper->assert_valid_data(array(
+ 'empty_opt' => array(
+ array(),
+ '',
+ array('string', true),
+ ),
+ 'empty' => array(
+ array(),
+ '',
+ array('string'),
+ ),
+ 'foo' => array(
+ array(),
+ 'foobar',
+ array('string'),
+ ),
+ 'foo_minmax_correct' => array(
+ array(),
+ 'foobar',
+ array('string', false, 2, 6),
+ ),
+ 'foo_minmax_short' => array(
+ array('TOO_SHORT'),
+ 'foobar',
+ array('string', false, 7, 9),
+ ),
+ 'foo_minmax_long' => array(
+ array('TOO_LONG'),
+ '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),
+ ),
));
}
}