namespace Drupal\Tests\block_content\Functional;
+use Drupal\block_content\Entity\BlockContent;
+
/**
* Tests the Views-powered listing of custom blocks.
*
// Confirm that the empty text is displayed.
$this->assertText('There are no custom blocks available.');
$this->assertLink('custom block');
+
+ $block_content = BlockContent::create([
+ 'info' => 'Non-reusable block',
+ 'type' => 'basic',
+ 'reusable' => FALSE,
+ ]);
+ $block_content->save();
+
+ $this->drupalGet('admin/structure/block/block-content');
+ // Confirm that the empty text is displayed.
+ $this->assertSession()->pageTextContains('There are no custom blocks available.');
+ // Confirm the non-reusable block is not on the page.
+ $this->assertSession()->pageTextNotContains('Non-reusable block');
}
}