X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock_content%2Ftests%2Fsrc%2FFunctional%2FBlockContentListViewsTest.php;fp=web%2Fcore%2Fmodules%2Fblock_content%2Ftests%2Fsrc%2FFunctional%2FBlockContentListViewsTest.php;h=f9cf29eb77bcc20ea4c47a4871c3f2d10d25ab9e;hp=1c623be82eba3c9cf4af6525a00f07fa3971df37;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php b/web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php index 1c623be82..f9cf29eb7 100644 --- a/web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php +++ b/web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php @@ -2,6 +2,8 @@ namespace Drupal\Tests\block_content\Functional; +use Drupal\block_content\Entity\BlockContent; + /** * Tests the Views-powered listing of custom blocks. * @@ -112,6 +114,19 @@ class BlockContentListViewsTest extends BlockContentTestBase { // 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'); } }