1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

[ticket/12331] Add functional test for saving custom profile fields

PHPBB3-12331
This commit is contained in:
Joas Schilling 2014-04-01 21:36:11 +02:00
parent 86c4d24a8a
commit 45e6dd23e9

View File

@ -0,0 +1,33 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* @group functional
*/
class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case
{
public function test_submitting_profile_info()
{
$this->add_lang('ucp');
$this->login();
$crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info');
$this->assertContainsLang('UCP_PROFILE_PROFILE_INFO', $crawler->filter('#cp-main h2')->text());
$form = $crawler->selectButton('Submit')->form(array(
'pf_phpbb_location' => 'Bertie´s Empire',
));
$crawler = self::submit($form);
$this->assertContainsLang('PROFILE_UPDATED', $crawler->filter('#message')->text());
$crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info');
$form = $crawler->selectButton('Submit')->form();
$this->assertEquals('Bertie´s Empire', $form->get('pf_phpbb_location')->getValue());
}
}