aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShitiz Garg <mail@dragooon.net>2014-06-18 01:05:57 +0530
committerShitiz Garg <mail@dragooon.net>2014-06-18 01:05:57 +0530
commit80d9e4b2e319b8a1b93c876e5304a6ed7b50b1d8 (patch)
tree56636ad259f9390b5d263aecddfcf8b4bc320458 /tests/profilefields
parent[ticket/12514] Minor fault in type_bool_test.php (diff)
downloadphpbb-80d9e4b2e319b8a1b93c876e5304a6ed7b50b1d8.tar.gz
phpbb-80d9e4b2e319b8a1b93c876e5304a6ed7b50b1d8.tar.bz2
phpbb-80d9e4b2e319b8a1b93c876e5304a6ed7b50b1d8.zip
[ticket/12514] Add a few more validation cases for type_string_test
PHPBB3-12514
Diffstat (limited to 'tests/profilefields')
-rw-r--r--tests/profilefields/type_string_test.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php
index f1423d59d9..17adf1f5f4 100644
--- a/tests/profilefields/type_string_test.php
+++ b/tests/profilefields/type_string_test.php
@@ -61,6 +61,30 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case
'Field should not accept empty values for required fields',
),
array(
+ null,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should not accept empty values for required field',
+ ),
+ array(
+ 0,
+ array('field_required' => true),
+ false,
+ 'Field should accept a non-empty input',
+ ),
+ array(
+ 'false',
+ array('field_required' => true),
+ false,
+ 'Field should accept a non-empty input',
+ ),
+ array(
+ 10,
+ array('field_required' => true),
+ false,
+ 'Field should accept a non-empty input',
+ ),
+ array(
'tas',
array('field_minlen' => 2, 'field_maxlen' => 5),
false,