protected function SanitizerTest::setUp in Layout Builder Block Sanitizer 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ SanitizerTest.php, line 30
Class
- SanitizerTest
- Tests block sanitization.
Namespace
Drupal\Tests\layout_builder_block_sanitizer\FunctionalCode
protected function setUp() {
$this->strictConfigSchema = NULL;
parent::setUp();
// Create basic block.
$label = 'basic';
$bundle = BlockContentType::create([
'id' => $label,
'label' => $label,
'revision' => FALSE,
]);
$bundle
->save();
block_content_add_body_field($bundle
->id());
// Create content type w/ layout builder enabled.
$this
->createContentType([
'type' => 'bundle_with_section_field',
]);
$this
->createNode([
'type' => 'bundle_with_section_field',
]);
$this
->drupalLogin($this
->drupalCreateUser([
'configure any layout',
'administer node display',
'administer display modes',
'use layout builder block sanitizer',
'administer blocks',
], 'foobar'));
}