diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockInstanceTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockInstanceTest.php index ea78e2f..191e3da 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockInstanceTest.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockInstanceTest.php @@ -24,7 +24,7 @@ class CustomBlockInstanceTest extends CustomBlockTestBase { */ public static function getInfo() { return array( - 'name' => 'Custom Block Instances', + 'name' => 'Custom Block instances', 'description' => 'Create a block and test placing the block twice (creating two instances).', 'group' => 'Custom Block', ); @@ -42,8 +42,8 @@ public function testPlaceBlockTwice() { $block2 = $this->drupalPlaceBlock('custom_block:' . $custom_block->uuid()); $this->drupalGet(''); - $this->assertText(t($block1->label()), 'Block 1 found on home.'); - $this->assertText(t($block2->label()), 'Block 2 found on home.'); + $this->assertBlockAppears($block1); + $this->assertBlockAppears($block2); // Make sure the same custom block entity is displayed in both blocks by // checking the body field. diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php index badd8c3..3144935 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php @@ -294,8 +294,8 @@ function testPlaceBlockTwice() { $block2 = $this->drupalPlaceBlock($plugin_id); $this->drupalGet('node'); - $this->assertText(t($block1->label()), 'Block 1 found on home.'); - $this->assertText(t($block2->label()), 'Block 2 found on home.'); + $this->assertBlockAppears($block1); + $this->assertBlockAppears($block2); } /** @@ -336,8 +336,8 @@ function testPlaceMenuBlockTwice() { $block2 = $this->drupalPlaceBlock($plugin_id); $this->drupalGet('node'); - $this->assertText(t($block1->label()), 'Block 1 found on home.'); - $this->assertText(t($block2->label()), 'Block 2 found on home.'); + $this->assertBlockAppears($block1); + $this->assertBlockAppears($block2); } }