mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-01 20:19:13 +02:00
* '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
54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* @package testing
|
|
* @copyright (c) 2013 phpBB Group
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
*
|
|
*/
|
|
|
|
require_once dirname(__FILE__) . '/common_groups_test.php';
|
|
|
|
/**
|
|
* @group functional
|
|
*/
|
|
class phpbb_functional_ucp_groups_test extends phpbb_functional_common_groups_test
|
|
{
|
|
protected $db;
|
|
|
|
protected function get_url()
|
|
{
|
|
return 'ucp.php?i=groups&mode=manage&action=edit';
|
|
}
|
|
|
|
protected function get_teampage_settings()
|
|
{
|
|
if (!isset($this->db))
|
|
{
|
|
$this->db = $this->get_db();
|
|
}
|
|
$sql = 'SELECT g.group_legend AS group_legend, t.teampage_position AS group_teampage
|
|
FROM ' . GROUPS_TABLE . ' g
|
|
LEFT JOIN ' . TEAMPAGE_TABLE . ' t
|
|
ON (t.group_id = g.group_id)
|
|
WHERE g.group_id = 5';
|
|
$result = $this->db->sql_query($sql);
|
|
$group_row = $this->db->sql_fetchrow($result);
|
|
$this->db->sql_freeresult($result);
|
|
return $group_row;
|
|
}
|
|
|
|
public function test_ucp_groups_teampage()
|
|
{
|
|
$this->group_manage_login();
|
|
|
|
// Test if group_legend or group_teampage are modified while
|
|
// submitting the ucp_group_manage page
|
|
$form = $this->get_group_manage_form();
|
|
$teampage_settings = $this->get_teampage_settings();
|
|
$crawler = self::submit($form);
|
|
$this->assertContains($this->lang('GROUP_UPDATED'), $crawler->text());
|
|
$this->assertEquals($teampage_settings, $this->get_teampage_settings());
|
|
}
|
|
}
|