From deefe5c0e48534cea1327cf685255d109d9d7e2c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 14 May 2013 22:39:33 +0200 Subject: [ticket/11538] Simplify colour value check and remove support for '#' The input length for the hex color is now limited to 6 characters and the support for colors starting with a '#' has been dropped. The allowed input length of 7 in prosilver seems to have been a relict from old ages of phpBB3. In order to have proper support for correct checking of the colour value, the new code was also ported to the ACP groups manage page. The tests have been modified to reflect the changes to the behavior of the color check. Tests for the ACP will follow. PHPBB3-11538 --- tests/functional/ucp_groups_test.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/functional/ucp_groups_test.php b/tests/functional/ucp_groups_test.php index d5ac6f697e..7a315c2018 100644 --- a/tests/functional/ucp_groups_test.php +++ b/tests/functional/ucp_groups_test.php @@ -15,15 +15,14 @@ class phpbb_functional_ucp_groups_test extends phpbb_functional_test_case public function groups_manage_test_data() { return array( - array('#AA0000', 'GROUP_UPDATED'), + array('#AA0000', 'WRONG_DATA_COLOUR'), array('AA0000', 'GROUP_UPDATED'), - array('AA0000v', 'COLOUR_INVALID'), - array('vAA0000', 'COLOUR_INVALID'), - array('AAG000', 'COLOUR_INVALID'), - array('#a00', 'GROUP_UPDATED'), - array('ag0', 'COLOUR_INVALID'), - array('#ag0', 'COLOUR_INVALID'), - array('##bcc', 'COLOUR_INVALID'), + array('AA0000v', 'WRONG_DATA_COLOUR'), + array('vAA0000', 'WRONG_DATA_COLOUR'), + array('AAG000','WRONG_DATA_COLOUR'), + array('a00', 'GROUP_UPDATED'), + array('ag0', 'WRONG_DATA_COLOUR'), + array('#aa0', 'WRONG_DATA_COLOUR'), ); } -- cgit v1.2.1