From 0a5988ec1f3d72afb17b87d6cd74f60b646bae42 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 17 May 2013 12:32:09 +0200 Subject: [ticket/11538] Use abstract class for functional test cases for group colour PHPBB3-11538 --- tests/functional/common_groups_test.php | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/functional/common_groups_test.php (limited to 'tests/functional/common_groups_test.php') diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php new file mode 100644 index 0000000000..3061bf7510 --- /dev/null +++ b/tests/functional/common_groups_test.php @@ -0,0 +1,50 @@ +login(); + $this->admin_login(); + $this->add_lang(array('ucp', 'acp/groups')); + + $crawler = $this->request('GET', $this->get_url() . '&sid=' . $this->sid); + $this->assert_response_success(); + $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); + $form['group_colour']->setValue($input); + $crawler = $this->client->submit($form); + $this->assertContains($this->lang($expected), $crawler->text()); + } +} -- cgit v1.2.1 From 8aea2b382dcb57f67704dec5194378d9a76c127e Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 19 May 2013 11:44:26 +0200 Subject: [ticket/11538] Move group ID into abstract test class and add more test cases The group ID is defined in the abstract class now and additional test cases for hex colour values have been added. PHPBB3-11538 --- tests/functional/common_groups_test.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/functional/common_groups_test.php') diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php index 3061bf7510..985dbc9220 100644 --- a/tests/functional/common_groups_test.php +++ b/tests/functional/common_groups_test.php @@ -20,6 +20,7 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test array('#AA0000', 'WRONG_DATA_COLOUR'), array('AA0000', 'GROUP_UPDATED'), array('AA0000v', 'WRONG_DATA_COLOUR'), + array('AA00000', 'WRONG_DATA_COLOUR'), array('vAA0000', 'WRONG_DATA_COLOUR'), array('AAG000','WRONG_DATA_COLOUR'), array('a00', 'GROUP_UPDATED'), @@ -28,6 +29,8 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test array('AA0000 ', 'GROUP_UPDATED'), array('AA0000 abf', 'WRONG_DATA_COLOUR'), array('AA0000 AA0000', 'WRONG_DATA_COLOUR'), + array('000 ', 'GROUP_UPDATED'), + array('000000 ', 'GROUP_UPDATED'), ); } @@ -40,7 +43,8 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test $this->admin_login(); $this->add_lang(array('ucp', 'acp/groups')); - $crawler = $this->request('GET', $this->get_url() . '&sid=' . $this->sid); + // Manage Administrators group + $crawler = $this->request('GET', $this->get_url() . '&g=5&sid=' . $this->sid); $this->assert_response_success(); $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); $form['group_colour']->setValue($input); -- cgit v1.2.1 From e49b4543de7c18df7e9b5c70ef5064cc4de9934a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 19 May 2013 15:17:47 +0200 Subject: [ticket/11538] Modify test colour values PHPBB3-11538 --- tests/functional/common_groups_test.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/functional/common_groups_test.php') diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php index 985dbc9220..02a538d46e 100644 --- a/tests/functional/common_groups_test.php +++ b/tests/functional/common_groups_test.php @@ -29,8 +29,9 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test array('AA0000 ', 'GROUP_UPDATED'), array('AA0000 abf', 'WRONG_DATA_COLOUR'), array('AA0000 AA0000', 'WRONG_DATA_COLOUR'), - array('000 ', 'GROUP_UPDATED'), - array('000000 ', 'GROUP_UPDATED'), + array('', 'GROUP_UPDATED'), + array('000', 'GROUP_UPDATED'), + array('000000', 'GROUP_UPDATED'), ); } -- cgit v1.2.1