function BlockContentTypeResourceTestBase::createEntity
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- 
              core/modules/ block_content/ tests/ src/ Functional/ Rest/ BlockContentTypeResourceTestBase.php, line 35 
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.
