function BlockContentTypeResourceTestBase::createEntity
Same name in other branches
- 9 core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php \Drupal\Tests\block_content\Functional\Rest\BlockContentTypeResourceTestBase::createEntity()
- 8.9.x core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php \Drupal\Tests\block_content\Functional\Rest\BlockContentTypeResourceTestBase::createEntity()
- 11.x core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php \Drupal\Tests\block_content\Functional\Rest\BlockContentTypeResourceTestBase::createEntity()
Overrides EntityResourceTestBase::createEntity
File
-
core/
modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentTypeResourceTestBase.php, line 37
Class
Namespace
Drupal\Tests\block_content\Functional\RestCode
protected function createEntity() {
$block_content_type = BlockContentType::create([
'id' => 'pascal',
'label' => 'Pascal',
'revision' => FALSE,
'description' => 'Provides a competitive alternative to the "basic" type',
]);
$block_content_type->save();
return $block_content_type;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.