aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/validate_num_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_num_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_num_test.php')
-rw-r--r--tests/functions/validate_num_test.php54
1 files changed, 31 insertions, 23 deletions
diff --git a/tests/functions/validate_num_test.php b/tests/functions/validate_num_test.php
index 4e210ba29a..4deac02ebc 100644
--- a/tests/functions/validate_num_test.php
+++ b/tests/functions/validate_num_test.php
@@ -23,29 +23,37 @@ class phpbb_functions_validate_num_test extends phpbb_test_case
public function test_validate_num()
{
- $this->helper->assert_validate_data(array(
- 'empty' => array(),
- 'zero' => array(),
- 'five_minmax_correct' => array(),
- 'five_minmax_short' => array('TOO_SMALL'),
- 'five_minmax_long' => array('TOO_LARGE'),
- 'string' => array(),
- ),
- array(
- 'empty' => '',
- 'zero' => 0,
- 'five_minmax_correct' => 5,
- 'five_minmax_short' => 5,
- 'five_minmax_long' => 5,
- 'string' => 'foobar',
- ),
- array(
- 'empty' => array('num'),
- 'zero' => array('num'),
- 'five_minmax_correct' => array('num', false, 2, 6),
- 'five_minmax_short' => array('num', false, 7, 10),
- 'five_minmax_long' => array('num', false, 2, 3),
- 'string' => array('num'),
+ $this->helper->assert_valid_data(array(
+ 'empty' => array(
+ array(),
+ '',
+ array('num'),
+ ),
+ 'zero' => array(
+ array(),
+ '0',
+ array('num'),
+ ),
+ 'five_minmax_correct' => array(
+ array(),
+ '5',
+ array('num', false, 2, 6),
+ ),
+ 'five_minmax_short' => array(
+ array('TOO_SMALL'),
+ '5',
+ array('num', false, 7, 10),
+ ),
+ 'five_minmax_long' => array(
+ array('TOO_LARGE'),
+ '5',
+ array('num', false, 2, 3),
+ ),
+ 'string' => array(
+ array(),
+ 'foobar',
+ array('num'),
+ ),
));
}
}