From 6ba61785f8da8df917866055e0119bc4fceeae0d Mon Sep 17 00:00:00 2001 From: Nicofuma Date: Sat, 26 Apr 2014 15:46:50 +0200 Subject: [ticket/12097] Bug fix and adding unit test PHPBB3-12097 --- tests/functions/validate_with_method_test.php | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/functions/validate_with_method_test.php (limited to 'tests/functions/validate_with_method_test.php') diff --git a/tests/functions/validate_with_method_test.php b/tests/functions/validate_with_method_test.php new file mode 100644 index 0000000000..86d7b9571c --- /dev/null +++ b/tests/functions/validate_with_method_test.php @@ -0,0 +1,39 @@ +helper = new phpbb_functions_validate_data_helper($this); + } + + public function test_validate_date() + { + $this->helper->assert_valid_data(array( + 'method_call' => array( + array(), + true, + array(array(array($this, 'with_method'), false)), + ), + )); + } + + public function validate_with_method($bool, $optional = false) + { + return ! $bool; + } +} -- cgit v1.2.1 From a759704b39fc1c1353f865a633759b1369589b67 Mon Sep 17 00:00:00 2001 From: Yuriy Rusko Date: Tue, 27 May 2014 20:18:06 +0200 Subject: [ticket/12594] Remove @package tags and update file headers PHPBB3-12594 --- tests/functions/validate_with_method_test.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/functions/validate_with_method_test.php') diff --git a/tests/functions/validate_with_method_test.php b/tests/functions/validate_with_method_test.php index 86d7b9571c..37e05d412a 100644 --- a/tests/functions/validate_with_method_test.php +++ b/tests/functions/validate_with_method_test.php @@ -1,9 +1,13 @@ +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ -- cgit v1.2.1