diff options
| author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-06-06 14:23:20 -0500 |
|---|---|---|
| committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-06-06 14:23:20 -0500 |
| commit | b4b1704a9b2f2c6e7770f478e27c5c408772f3ff (patch) | |
| tree | 42246af57eca463d63b9ef52f6c1c242fbcfddba /tests/functional/common_groups_test.php | |
| parent | 8c3bb26a62ade208d5035015299c2126b15854cb (diff) | |
| parent | 495b22632c489f08c46f6712f917e920911e5759 (diff) | |
| download | forums-b4b1704a9b2f2c6e7770f478e27c5c408772f3ff.tar forums-b4b1704a9b2f2c6e7770f478e27c5c408772f3ff.tar.gz forums-b4b1704a9b2f2c6e7770f478e27c5c408772f3ff.tar.bz2 forums-b4b1704a9b2f2c6e7770f478e27c5c408772f3ff.tar.xz forums-b4b1704a9b2f2c6e7770f478e27c5c408772f3ff.zip | |
Merge remote-tracking branch 'remotes/Marc/ticket/11587' into develop
# By Marc Alexander
# Via Marc Alexander
* remotes/Marc/ticket/11587:
[ticket/11587] Add functional tests for group teampage settings
[ticket/11587] Pass legend and teampage settings to group_create()
Diffstat (limited to 'tests/functional/common_groups_test.php')
| -rw-r--r-- | tests/functional/common_groups_test.php | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php index 7ccd78421e..53f7ead29a 100644 --- a/tests/functional/common_groups_test.php +++ b/tests/functional/common_groups_test.php @@ -14,6 +14,30 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test { abstract protected function get_url(); + /** + * Get group_manage form + * @param int $group_id ID of the group that should be managed + */ + protected function get_group_manage_form($group_id = 5) + { + // Manage Administrators group + $crawler = $this->request('GET', $this->get_url() . "&g=$group_id&sid=" . $this->sid); + $this->assert_response_success(); + //var_export($this->client->getResponse()->getContent()); + $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); + return $form; + } + + /** + * Execute login calls and add_lang() calls for tests + */ + protected function group_manage_login() + { + $this->login(); + $this->admin_login(); + $this->add_lang(array('ucp', 'acp/groups')); + } + public function groups_manage_test_data() { return array( @@ -30,14 +54,10 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test */ public function test_groups_manage($input, $expected) { - $this->login(); - $this->admin_login(); - $this->add_lang(array('ucp', 'acp/groups')); + $this->group_manage_login(); // 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 = $this->get_group_manage_form(); $form['group_colour']->setValue($input); $crawler = $this->client->submit($form); $this->assertContains($this->lang($expected), $crawler->text()); |
