aboutsummaryrefslogtreecommitdiffstats
path: root/tests/profilefields
diff options
context:
space:
mode:
authorShitiz Garg <mail@dragooon.net>2014-06-18 14:37:13 +0530
committerShitiz Garg <mail@dragooon.net>2014-06-18 17:48:47 +0530
commit566f76a6b082c9e0a85a1e7d8995f65b8a121b8c (patch)
treefa7969c81b595554bb6836a5b1ca45b5e3fc340d /tests/profilefields
parente820143e87da13be621bcfb5c9cf65fa83389715 (diff)
downloadforums-566f76a6b082c9e0a85a1e7d8995f65b8a121b8c.tar
forums-566f76a6b082c9e0a85a1e7d8995f65b8a121b8c.tar.gz
forums-566f76a6b082c9e0a85a1e7d8995f65b8a121b8c.tar.bz2
forums-566f76a6b082c9e0a85a1e7d8995f65b8a121b8c.tar.xz
forums-566f76a6b082c9e0a85a1e7d8995f65b8a121b8c.zip
[ticket/12514] Add a few additional tests for type_int
PHPBB3-12514
Diffstat (limited to 'tests/profilefields')
-rw-r--r--tests/profilefields/type_int_test.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/profilefields/type_int_test.php b/tests/profilefields/type_int_test.php
index a12909722a..11278e8f52 100644
--- a/tests/profilefields/type_int_test.php
+++ b/tests/profilefields/type_int_test.php
@@ -136,6 +136,24 @@ class phpbb_profilefield_type_int_test extends phpbb_test_case
'FIELD_TOO_SMALL-10-field',
'Field should reject value which is less than defined minimum',
),
+ array(
+ true,
+ array('field_maxlen' => 20),
+ false,
+ 'Field should accept correct boolean value',
+ ),
+ array(
+ 'string',
+ array('field_maxlen' => 10, 'field_required' => true),
+ false,
+ 'Field should accept correct string value',
+ ),
+ array(
+ null,
+ array('field_minlen' => 1, 'field_maxlen' => 10, 'field_required' => true),
+ 'FIELD_TOO_SMALL-1-field',
+ 'Field should not accept an empty value',
+ ),
);
}