diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php index 4fbb1f7..979caeb 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php @@ -38,6 +38,10 @@ public function testBlockLinks() { $feed = $this->createFeed(); $this->updateFeedItems($feed, $this->getDefaultFeedItemCount()); + // Clear the block cache to load the new block definitions. + $manager = $this->container->get('plugin.manager.block'); + $manager->clearCachedDefinitions(); + // Need admin user to be able to access block admin. $admin_user = $this->drupalCreateUser(array( 'administer blocks', @@ -51,7 +55,7 @@ public function testBlockLinks() { 'title' => 'feed-' . $feed->title, 'block_count' => 2, ); - $this->drupalPlaceBlock('aggregator_feed_block:{$feed->fid}', NULL, $block); + $this->drupalPlaceBlock("aggregator_feed_block:{$feed->fid}", NULL, $block); // Confirm that the block is now being displayed on pages. $this->drupalGet('node'); diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php index b3f5453..b4960ad 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php @@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase; /** - * Test block HTML id validity. + * Tests block HTML ID validity. */ class BlockHtmlIdTest extends WebTestBase { @@ -28,8 +28,8 @@ class BlockHtmlIdTest extends WebTestBase { public static function getInfo() { return array( - 'name' => 'Block HTML id', - 'description' => 'Test block HTML id validity.', + 'name' => 'Block HTML ID', + 'description' => 'Tests block HTML ID validity.', 'group' => 'Block', ); } @@ -46,7 +46,7 @@ function setUp() { state()->set('block_test.content', $current_content); // Enable our test block. - $this->drupalPlaceBlock('test_html_id'); + $this->drupalPlaceBlock('test_html_id', '', array('machine_name' => 'test_id_block')); } /** @@ -56,4 +56,5 @@ function testHtmlId() { $this->drupalGet(''); $this->assertRaw('id="block-test-id-block"', 'HTML ID for test block is valid.'); } + } diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php index e13fcf5..ec41b39 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockInvalidRegionTest.php @@ -61,7 +61,6 @@ function testBlockInInvalidRegion() { $this->assertNoRaw($warning_message, 'Disabled block in the invalid region will not trigger the warning.'); // Place disabled test block in the invalid region of the default theme. - $config = config($machine_name); $config->set('region', 'invalid_region'); $config->save();