diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php index 12f1542..e1f8fcd 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php @@ -39,7 +39,6 @@ public function testBlockLinks() { $this->updateFeedItems($feed, $this->getDefaultFeedItemCount()); // Clear the block cache to load the new block definitions. - // @todo Remove this. $this->container->get('plugin.manager.block')->clearCachedDefinitions(); // Need admin user to be able to access block admin. diff --git a/core/modules/block/block.api.php b/core/modules/block/block.api.php index defde15..c889e68 100644 --- a/core/modules/block/block.api.php +++ b/core/modules/block/block.api.php @@ -29,7 +29,7 @@ * @see hook_block_view_ID_alter() * @see hook_block_view_NAME_alter() */ -function hook_block_view_alter(array &$build, \Drupal\block\BlockInterface $block) { +function hook_block_view_alter(array &$build, \Drupal\block\Plugin\Core\Entity\Block $block) { // Remove the contextual links on all blocks that provide them. if (is_array($build) && isset($build['#contextual_links'])) { unset($build['#contextual_links']); diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php index 46d981d..5f72c7b 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php @@ -80,7 +80,6 @@ public function testCustomBlock() { $this->removeDefaultBlocks(); // Clear the block cache to load the Custom Block module's block definitions. - // @todo Remove this. $this->container->get('plugin.manager.block')->clearCachedDefinitions(); // Enable a second theme. @@ -348,7 +347,6 @@ function testBlockRehash() { $this->assertTrue(module_exists('block_test'), 'Test block module enabled.'); // Clear the block cache to load the block_test module's block definitions. - // @todo Remove this. $this->container->get('plugin.manager.block')->clearCachedDefinitions(); // Add a test block. @@ -380,7 +378,6 @@ function testBlockModuleDisable() { $this->assertTrue(module_exists('block_test'), 'Test block module enabled.'); // Clear the block cache to load the block_test module's block definitions. - // @todo Remove this. $manager = $this->container->get('plugin.manager.block'); $manager->clearCachedDefinitions(); @@ -398,7 +395,6 @@ function testBlockModuleDisable() { // Disable the block test module and refresh the definitions cache. module_disable(array('block_test'), FALSE); $this->assertFalse(module_exists('block_test'), 'Test block module disabled.'); - // @todo Remove this. $manager->clearCachedDefinitions(); // Ensure that the block administration page still functions as expected. @@ -444,7 +440,6 @@ function testBlockModuleDisable() { // Re-enable the module and refresh the definitions cache. module_enable(array('block_test'), FALSE); $this->assertTrue(module_exists('block_test'), 'Test block module re-enabled.'); - // @todo Remove this. $manager->clearCachedDefinitions(); // Reload the admin page and confirm the block can again be configured. diff --git a/core/modules/block/tests/config/plugin.core.block.stark.test_block.yml b/core/modules/block/tests/config/plugin.core.block.stark.test_block.yml index dacfb64..9ddba24 100644 --- a/core/modules/block/tests/config/plugin.core.block.stark.test_block.yml +++ b/core/modules/block/tests/config/plugin.core.block.stark.test_block.yml @@ -1,6 +1,5 @@ id: stark.test_block label: '' -uuid: 6dcd7278-40c5-426a-9804-4fd859748a30 region: '-1' weight: '' cache: '1' diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php index 10a7ce9..fa71476 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php @@ -89,7 +89,7 @@ public function testNewForumTopicsBlock() { /** * Tests the "Active forum topics" block. */ - public function _testActiveForumTopicsBlock() { + public function testActiveForumTopicsBlock() { $this->drupalLogin($this->adminUser); // Create 10 forum topics. @@ -112,6 +112,7 @@ public function _testActiveForumTopicsBlock() { // Enable the block. $block = $this->drupalPlaceBlock('forum_active_block'); + $this->drupalGet(''); $this->assertLink(t('More'), 0, 'Active forum topics block has a "more"-link.'); $this->assertLinkByHref('forum', 0, 'Active forum topics block has a "more"-link.'); diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index dbfcacc..1b1aee5 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -12,6 +12,7 @@ */ use Drupal\node\Plugin\Core\Entity\Node; +use Drupal\block\Plugin\Core\Entity\Block; use Drupal\system\Plugin\Core\Entity\Menu; use Drupal\system\Plugin\block\block\SystemMenuBlock; use Symfony\Component\HttpFoundation\JsonResponse; @@ -432,7 +433,7 @@ function menu_reset_item($link) { /** * Implements hook_block_view_alter(). */ -function menu_block_view_alter(&$build, $block) { +function menu_block_view_alter(array &$build, Block $block) { // Add contextual links for system menu blocks. if ($block->getPlugin() instanceof SystemMenuBlock) { foreach (element_children($build) as $key) { diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php index f73b77f..3c59631 100644 --- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php +++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php @@ -72,7 +72,6 @@ function testAccessLogging() { */ function testPopularContentBlock() { // Clear the block cache to load the Statistics module's block definitions. - // @todo Remove this. $this->container->get('plugin.manager.block')->clearCachedDefinitions(); // Visit a node to have something show up in the block. diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php index 5c654a5..be4868e 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php @@ -58,7 +58,7 @@ function testOverrideDisplays() { $this->assertText('View: ' . $view['human_name']); // Place the block. - $this->drupalPlaceBlock("views_block:{$view['name']}-block_1", array('label' => '')); + $this->drupalPlaceBlock("views_block:{$view['name']}-block_1"); // Make sure the title appears in the block. $this->drupalGet('');