protected function FixedBlockContentKernelTestBase::createBasicBlockType in Fixed Block Content 8
Creates the basic custom block type.
1 call to FixedBlockContentKernelTestBase::createBasicBlockType()
- FixedBlockContentKernelTestBase::setUp in tests/
src/ Kernel/ FixedBlockContentKernelTestBase.php
File
- tests/
src/ Kernel/ FixedBlockContentKernelTestBase.php, line 79
Class
- FixedBlockContentKernelTestBase
- Basic setup for fixed block content kernel tests.
Namespace
Drupal\Tests\fixed_block_content\KernelCode
protected function createBasicBlockType() {
// Create a content block type.
$type = $this->entityTypeManager
->getStorage('block_content_type')
->create([
'id' => 'basic',
'label' => 'Basic',
'revision' => FALSE,
]);
$type
->save();
// Adds the body field.
block_content_add_body_field($type
->id());
}