1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00
php-phpbb/tests/functional/ucp_profile_test.php
Joas Schilling 3c38fcce40 Merge pull request #2621 from Dragooon/ticket/12732
[ticket/12732] Add Skype custom profile field

* Dragooon/ticket/12732:
  [ticket/12732] Update schema.json for Skype
  [ticket/12732] Add functional test for Skype profile field
  [ticket/12732] Values shouldn't be escaped for schema_data.sql
  [ticket/12732] Set field_active to 1 for Skype's field
  [ticket/12732] Add unit tests for ALPHA_PUNCTUATION
  [ticket/12732] Missing comma after validation definition
  [ticket/12732] Improve ALPHA_PUNCTUATION description
  [ticket/12732] Use user info instead of chat as default Skype action
  [ticket/12732] Add Skype custom profile field

Conflicts:
	phpBB/install/schemas/schema.json
	phpBB/install/schemas/schema_data.sql
	phpBB/language/en/memberlist.php
	tests/functional/ucp_profile_test.php
	tests/profilefields/type_string_test.php
2014-06-20 23:39:54 +02:00

46 lines
1.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
/**
* @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_facebook' => 'phpbb',
'pf_phpbb_location' => 'Bertie´s Empire',
'pf_phpbb_skype' => 'phpbb.skype.account',
'pf_phpbb_twitter' => 'phpbb_twitter',
));
$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('phpbb', $form->get('pf_phpbb_facebook')->getValue());
$this->assertEquals('Bertie´s Empire', $form->get('pf_phpbb_location')->getValue());
$this->assertEquals('phpbb.skype.account', $form->get('pf_phpbb_skype')->getValue());
$this->assertEquals('phpbb_twitter', $form->get('pf_phpbb_twitter')->getValue());
}
}