mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
* ticket/11568: [ticket/11568] Add method to get page content [ticket/11568] Allow different status codes [ticket/11568] Trim the output to allow Tabs before INCLUDE overall_header [ticket/11568] Fix common_groups_test.php form handling [ticket/11568] Make CookieJar static aswell [ticket/11568] Remove manual calls to assert_response_success() [ticket/11568] Only use a static version of the client [ticket/11568] Any output before the doc type means there was an error [ticket/11568] Set client manually so we can increase the cURL timeout [ticket/11568] Use Goutte Client to install the board for functional tests Conflicts: tests/test_framework/phpbb_functional_test_case.php
51 lines
1.3 KiB
PHP
51 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
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* @group functional
|
|
*/
|
|
abstract class phpbb_functional_common_groups_test extends phpbb_functional_test_case
|
|
{
|
|
abstract protected function get_url();
|
|
|
|
public function groups_manage_test_data()
|
|
{
|
|
return array(
|
|
array('', 'GROUP_UPDATED'),
|
|
array('aa0000', 'GROUP_UPDATED'),
|
|
|
|
array('AAG000','WRONG_DATA_COLOUR'),
|
|
array('#AA0000', 'WRONG_DATA_COLOUR'),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @dataProvider groups_manage_test_data
|
|
*/
|
|
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'));
|
|
|
|
// Manage Administrators group
|
|
$crawler = $this->request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
|
|
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
|
|
$form['group_colour']->setValue($input);
|
|
$crawler = $this->submit($form);
|
|
$this->assertContains($this->lang($expected), $crawler->text());
|
|
}
|
|
}
|