diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 322b550..6f813e9 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -165,7 +165,7 @@ public function configureWrapper($form, &$form_state) { $form['settings']['title'] = array( '#type' => 'textfield', '#title' => t('Block title'), - '#maxlength' => 64, + '#maxlength' => 255, '#description' => $definition['module'] == 'block' ? t('The title of the block as shown to the user.') : t('Override the default title for the block. Use !placeholder to display no title, or leave blank to use the default block title.', array('!placeholder' => '<none>')), '#default_value' => isset($subject) ? $subject : '', '#weight' => -19, diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php index d2d023b..cf01fbe 100644 --- a/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php +++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php @@ -54,9 +54,8 @@ function testMenuNodeFormWidget() { 'menu_options[tools]' => 1, ); $this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type')); - // Change default parent item to Tools menu, so we can assert more easily. $edit = array( - 'menu_parent' => 'tools:0', + 'menu_parent' => 'main:0', ); $this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type')); diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/BlockUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/BlockUpgradePathTest.php index 57ce649..5bc27d2 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/BlockUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/BlockUpgradePathTest.php @@ -35,25 +35,23 @@ public function setUp() { public function testBlockUpgradeTitleLength() { $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.'); + $block_id = 'system_powered_by_block'; + $default_theme = variable_get('theme_default', 'stark'); + $block = array( + 'machine_name' => $this->randomName(8), + 'region' => 'sidebar_first', + ); + // Add a new custom block with a title of 255 characters. - $block_title_1 = $this->randomName(255); - $custom_block_1 = array(); - $custom_block_1['title'] = $block_title_1; - $custom_block_1['info'] = $this->randomName(8); - $custom_block_1['body[value]'] = $this->randomName(32); - $custom_block_1['regions[bartik]'] = 'sidebar_first'; - $this->drupalPost('admin/structure/block/add', $custom_block_1, t('Save block')); + $block['title'] = $this->randomName(255); + $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $block, t('Save block')); // Confirm that the custom block has been created, and title matches input. $this->drupalGet(''); - $this->assertText($block_title_1, 'Block with title longer than 64 characters successfully created.'); + $this->assertText($block['title'], 'Block with title longer than 64 characters successfully created.'); // Add a new custom block with a title over 255 characters. - $block_title_2 = $this->randomName(256); - $custom_block_2 = array(); - $custom_block_2['title'] = $block_title_2; - $custom_block_2['info'] = $this->randomName(8); - $custom_block_2['body[value]'] = $this->randomName(32); - $this->drupalPost('admin/structure/block/add', $custom_block_2, t('Save block')); + $block['title'] = $this->randomName(256); + $this->drupalPost('admin/structure/block/manage/' . $block_id . '/' . $default_theme, $block, t('Save block')); // Confirm that the custom block cannot be created with title longer than // the maximum number of characters. $this->assertText('Block title cannot be longer than 255 characters', 'Block with title longer than 255 characters created unsuccessfully.'); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php index a813f9f..4faacc1 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php @@ -19,7 +19,7 @@ class UserAccountLinksTests extends WebTestBase { * * @var array */ - public static $modules = array('menu'); + public static $modules = array('menu', 'block'); public static function getInfo() { return array(