diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php index 809f289..728ddc5 100644 --- a/core/modules/block/src/Tests/BlockTest.php +++ b/core/modules/block/src/Tests/BlockTest.php @@ -436,4 +436,29 @@ public function testUninstallTheme() { $this->assertIdentical(NULL, Block::load($block->id())); } + /** + * Test block configure menu default local task. + */ + function testBlockConfigure() { + $block_name = 'system_powered_by_block'; + // Create a random title for the block. + $title = $this->randomMachineName(8); + $machine_name = strtolower($this->randomMachineName(8)); + // Enable a standard block. + $default_theme = \Drupal::config('system.theme')->get('default'); + $edit = array( + 'id' => $default_theme . '_' . $machine_name, + 'region' => 'sidebar_first', + 'settings[label]' => $title, + ); + $this->drupalPostForm('admin/structure/block/add/' . $block_name . '/' . $default_theme, $edit, t('Save block')); + $this->assertText('The block configuration has been saved.', 'Block was saved'); + + $this->drupalGet('user'); + $this->assertText($title, 'Block title was displayed by default.'); + debug($title); + $this->drupalGet('admin/structure/block/manage/' . $default_theme . '_' . $machine_name); + $this->assertFieldByName('settings[label]', $title, 'Found block label input on configuration page'); + } + }