drupalLogin($this->adminUser); $block = $this->createBlockContent(); // Attempt to view the block. $this->drupalGet('block-content/' . $block->id()); // Assert response was '200' and not '403 Access denied'. $this->assertResponse('200', 'User was able the view the block'); $this->drupalGet(''); $this->assertRaw(t('This block is broken or missing. You may be missing content or you might need to enable the original module.')); } }