1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

Merge pull request #2611 from Dragooon/ticket/12729

[ticket/12729] Add Facebook custom profile field

* Dragooon/ticket/12729:
  [ticket/12729] Add functional test for Facebook field
  [ticket/12730] Values needn't be escaped for schema_data.sql
  [ticket/12729] Set field_active as 1 for Facebook profile field
  [ticket/12729] Add unit test for ALPHA_DOTS validation
  [ticket/12729] Move ALPHA_DOTS to above ALPHA_SPACERS
  [ticket/12729] Convert spaces to tabs
  [ticket/12729] Fix block header spacing for profilefield_facebook.php
  [ticket/12729] Update schema.json
  [ticket/12729] Unnecessary whitespace in profilefield_facebook.php
  [ticket/12729] Cleanup schema_data.sql for Facebook field
  [ticket/12729] Add Facebook custom profile field
This commit is contained in:
Joas Schilling
2014-06-20 23:36:26 +02:00
9 changed files with 83 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case
$form = $crawler->selectButton('Submit')->form(array(
'pf_phpbb_location' => 'Bertie´s Empire',
'pf_phpbb_facebook' => 'phpbb',
));
$crawler = self::submit($form);
$this->assertContainsLang('PROFILE_UPDATED', $crawler->filter('#message')->text());
@@ -33,5 +34,6 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case
$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());
$this->assertEquals('phpbb', $form->get('pf_phpbb_facebook')->getValue());
}
}

View File

@@ -143,6 +143,18 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case
false,
'Required field should accept a characters only field',
),
array(
'Valid.Username123',
array('field_validation' => '[\w.]+'),
false,
'Required field should accept a alphanumeric field with dots',
),
array(
'Invalid.,username123',
array('field_validation' => '[\w.]+'),
'FIELD_INVALID_CHARS_ALPHA_DOTS-field',
'Required field should reject field with comma',
),
);
}