aboutsummaryrefslogtreecommitdiffstats
path: root/tests/profilefields
diff options
context:
space:
mode:
authorShitiz Garg <mail@dragooon.net>2014-06-18 01:40:40 +0530
committerShitiz Garg <mail@dragooon.net>2014-06-18 01:40:40 +0530
commitf549a6ce9f4758d7e4fff588e407203d6a38fb88 (patch)
tree0961227719801baea4e87b0c3abdbb88bcaae9ae /tests/profilefields
parentaee20bcf0c94f37656b3d8bf213649a4ca702df6 (diff)
downloadforums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar
forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar.gz
forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar.bz2
forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar.xz
forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.zip
[ticket/12514] Add a few more tests for type_date
PHPBB3-12514
Diffstat (limited to 'tests/profilefields')
-rw-r--r--tests/profilefields/type_date_test.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/profilefields/type_date_test.php b/tests/profilefields/type_date_test.php
index 013d9d9082..b0ac114942 100644
--- a/tests/profilefields/type_date_test.php
+++ b/tests/profilefields/type_date_test.php
@@ -128,6 +128,42 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
'FIELD_INVALID_DATE-field',
'Field should reject value for being invalid',
),
+ array(
+ 'string',
+ array(),
+ false,
+ 'Field should reject value for being invalid',
+ ),
+ array(
+ 'string',
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being invalid',
+ ),
+ array(
+ 100,
+ array(),
+ false,
+ 'Field should reject value for being invalid',
+ ),
+ array(
+ 100,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being invalid',
+ ),
+ array(
+ null,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being empty',
+ ),
+ array(
+ true,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being empty',
+ )
);
}