mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11568-develop
* 'develop' of https://github.com/phpbb/phpbb3: (29 commits) [ticket/11588] Also use version.phpbb.com in install_update.php. [ticket/11587] Add functional tests for group teampage settings [ticket/11538] Add admin as admins leader and moderator in memberlist_test [ticket/11587] Pass legend and teampage settings to group_create() [ticket/11586] Move $filedata['thumbnail'] to where it might be returned. [ticket/11586] Combine $filedata['post_attach'] assign into a single statement. [ticket/11586] Use a variable for $cat_id == ATTACHMENT_CATEGORY_IMAGE. [ticket/11586] Combine administrator/moderator checks together. [ticket/11583] Use a new lang key instead of giving the old one a new meaning. [ticket/11122] Add dhruv to active authors [ticket/11122] Remove Oleg and igorw from active authors [ticket/10840] Add check_form_key to acp_groups.php [ticket/11583] Allow FULLTEXT indexes on InnoDB when on MySQL 5.6.4 or higher. [ticket/11409] Add success message after updating group position settings [ticket/11549] Add functional test for ACP Extension Module with Template [ticket/11570] Fix link and make the notice more conspiciuous [ticket/11549] Do not set extension dir path for style in adm/index.php [ticket/11570] Add link back to update process [ticket/11569] Add type parameter and fix language variable [ticket/11569] Add parameter to URL and remove comment ... Conflicts: tests/functional/common_groups_test.php
This commit is contained in:
@@ -14,6 +14,28 @@ 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 = self::request('GET', $this->get_url() . "&g=$group_id&sid=" . $this->sid);
|
||||
$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,19 +52,10 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
|
||||
*/
|
||||
public function test_groups_manage($input, $expected)
|
||||
{
|
||||
$this->markTestIncomplete(
|
||||
'Test fails on develop due to another test deleting the Administrators group.'
|
||||
);
|
||||
// See https://github.com/phpbb/phpbb3/pull/1407#issuecomment-18465480
|
||||
// and https://gist.github.com/bantu/22dc4f6c6c0b8f9e0fa1
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
$this->add_lang(array('ucp', 'acp/groups'));
|
||||
$this->group_manage_login();
|
||||
|
||||
// Manage Administrators group
|
||||
$crawler = self::request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
|
||||
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
|
||||
$form = $this->get_group_manage_form();
|
||||
$form['group_colour']->setValue($input);
|
||||
$crawler = self::submit($form);
|
||||
$this->assertContains($this->lang($expected), $crawler->text());
|
||||
|
Reference in New Issue
Block a user