public function EntityRenderHandlerTest::testOnCreateCdfMetadataSetCorrectly in Acquia Lift Connector 8.4
@covers ::onCreateCdf
Throws
\Drupal\Core\Entity\EntityStorageException
\Exception
File
- modules/
acquia_lift_publisher/ tests/ src/ Kernel/ EventSubscriber/ Cdf/ EntityRenderHandlerTest.php, line 151
Class
- EntityRenderHandlerTest
- Class EntityRenderHandlerTest.
Namespace
Drupal\Tests\acquia_lift_publisher\Kernel\EventSubscriber\CdfCode
public function testOnCreateCdfMetadataSetCorrectly() {
ConfigurableLanguage::create([
'id' => 'hu',
'label' => 'Hungarian',
])
->save();
$block = $this
->createBlockContent();
$block
->addTranslation('hu', [
'info' => $this
->randomString(),
]);
$this
->enableViewModeExportFor($block);
$event = $this
->dispatchWith($block, []);
$rendered_entities = $this
->getRenderedEntities($event
->getCdfList());
$this
->assertCdfListHasMetadata($rendered_entities);
}