3 namespace Drupal\Tests\block_content\Functional;
6 * Create a block and test block access by attempting to view the block.
10 class BlockContentPageViewTest extends BlockContentTestBase {
17 public static $modules = ['block_content_test'];
20 * Checks block edit and fallback functionality.
22 public function testPageEdit() {
23 $this->drupalLogin($this->adminUser);
24 $block = $this->createBlockContent();
26 // Attempt to view the block.
27 $this->drupalGet('block-content/' . $block->id());
29 // Assert response was '200' and not '403 Access denied'.
30 $this->assertResponse('200', 'User was able the view the block');
31 $this->drupalGet('<front>');
32 $this->assertRaw(t('This block is broken or missing. You may be missing content or you might need to enable the original module.'));