Commit f9e44fc4 authored by Dries's avatar Dries

- Patch #967566 by mariusz.slonina, rbayliss, joestewart, xjm, tim.plunkett,...

- Patch #967566 by mariusz.slonina, rbayliss, joestewart, xjm, tim.plunkett, indytechcook, tsvenson, adnasa, oriol_e9g | DocuAnt: Several important Core User settings lack support for hook_field_extra_fields().
parent b551b666
......@@ -625,6 +625,19 @@ function block_form_user_profile_form_alter(&$form, &$form_state) {
}
}
/**
* Implements hook_field_extra_fields().
*/
function block_field_extra_fields() {
$extra['user']['user']['form']['block'] = array(
'label' => t('Personalize blocks'),
'description' => t('Block module form element.'),
'weight' => 3,
);
return $extra;
}
/**
* Implements hook_user_presave().
*/
......
......@@ -848,6 +848,34 @@ class BlockHiddenRegionTestCase extends WebTestBase {
}
}
/**
* Tests personalized block settings for user accounts.
*/
class BlockUserAccountSettingsTestCase extends WebTestBase {
public static function getInfo() {
return array(
'name' => 'Personalized block settings',
'description' => 'Tests the block settings in user accounts.',
'group' => 'Block',
);
}
public function setUp() {
parent::setUp(array('block', 'field_ui'));
$admin_user = $this->drupalCreateUser(array('administer users'));
$this->drupalLogin($admin_user);
}
/**
* Tests that the personalized block is shown.
*/
function testAccountSettingsPage() {
$this->drupalGet('admin/config/people/accounts/fields');
$this->assertText(t('Personalize blocks'), 'Personalized block is present.');
}
}
/**
* Functional tests for the language list configuration forms.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment