protected function EntityRenderHandlerTest::createBlockContent in Acquia Lift Connector 8.4
Creates a random block content.
Return value
\Drupal\block_content\BlockContentInterface The block content.
Throws
\Drupal\Core\Entity\EntityStorageException
2 calls to EntityRenderHandlerTest::createBlockContent()
- EntityRenderHandlerTest::testOnCreateCdfBlockContent in modules/
acquia_lift_publisher/ tests/ src/ Kernel/ EventSubscriber/ Cdf/ EntityRenderHandlerTest.php - @covers ::onCreateCdf
- EntityRenderHandlerTest::testOnCreateCdfMetadataSetCorrectly in modules/
acquia_lift_publisher/ tests/ src/ Kernel/ EventSubscriber/ Cdf/ EntityRenderHandlerTest.php - @covers ::onCreateCdf
File
- modules/
acquia_lift_publisher/ tests/ src/ Kernel/ EventSubscriber/ Cdf/ EntityRenderHandlerTest.php, line 412
Class
- EntityRenderHandlerTest
- Class EntityRenderHandlerTest.
Namespace
Drupal\Tests\acquia_lift_publisher\Kernel\EventSubscriber\CdfCode
protected function createBlockContent() : BlockContentInterface {
/** @var \Drupal\block_content\BlockContentInterface $block_content */
$block_content = BlockContent::create([
'info' => $this
->randomString(),
'type' => $this->blockType
->id(),
'reusable' => TRUE,
]);
$block_content
->save();
return $block_content;
}