aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShitiz Garg <mail@dragooon.net>2014-06-14 14:27:23 +0530
committerShitiz Garg <mail@dragooon.net>2014-06-17 14:59:26 +0530
commit2fc5c51d9ac883d4fe77afbe94846fde5ce0a7f4 (patch)
tree7ee3251fa36c63a31e50b1c8ef107e2428a6c141 /tests/profilefields
parent[ticket/12514] Multi value GET parameters are invalid for phpBB (diff)
downloadphpbb-2fc5c51d9ac883d4fe77afbe94846fde5ce0a7f4.tar.gz
phpbb-2fc5c51d9ac883d4fe77afbe94846fde5ce0a7f4.tar.bz2
phpbb-2fc5c51d9ac883d4fe77afbe94846fde5ce0a7f4.zip
[ticket/12514] Fix type_int_test to correctly respect boundaries
PHPBB3-12514
Diffstat (limited to 'tests/profilefields')
-rw-r--r--tests/profilefields/type_int_test.php25
1 files changed, 9 insertions, 16 deletions
diff --git a/tests/profilefields/type_int_test.php b/tests/profilefields/type_int_test.php
index d3ce27691a..7189a4dda2 100644
--- a/tests/profilefields/type_int_test.php
+++ b/tests/profilefields/type_int_test.php
@@ -114,29 +114,22 @@ class phpbb_profilefield_type_int_test extends phpbb_test_case
{
return array(
array(
- '124',
- array('field_minlen' => 2, 'field_maxlen' => 4, 'field_required' => true),
+ '15',
+ array('field_minlen' => 10, 'field_maxlen' => 20, 'field_required' => true),
false,
- 'Field should accept input of correct length',
+ 'Field should accept input of correct boundaries',
),
array(
'556476',
- array('field_maxlen' => 4, 'field_required' => true),
- 'FIELD_TOO_LARGE-4-field',
- 'Field should reject value of greater length',
+ array('field_maxlen' => 50000, 'field_required' => true),
+ 'FIELD_TOO_LARGE-50000-field',
+ 'Field should reject value of greater value than max',
),
array(
'9',
- array('field_minlen' => 2, 'field_required' => true),
- 'FIELD_TOO_SMALL-2-field',
- 'Field should reject value which is less than defined minlength',
- ),
-
- array(
- '',
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should reject value for being empty',
+ array('field_minlen' => 10, 'field_required' => true),
+ 'FIELD_TOO_SMALL-10-field',
+ 'Field should reject value which is less than defined minimum',
),
);
}