public function EntityEmbedFilterLegacyTest::testEntityEmbedDisplayDefaultBackwardsCompatibility in Entity Embed 8
Tests BC for `data-entity-embed-display="default"`.
File
- tests/
src/ Kernel/ EntityEmbedFilterLegacyTest.php, line 83
Class
- EntityEmbedFilterLegacyTest
- @coversDefaultClass \Drupal\entity_embed\Plugin\Filter\EntityEmbedFilter @group entity_embed @group legacy
Namespace
Drupal\Tests\entity_embed\KernelCode
public function testEntityEmbedDisplayDefaultBackwardsCompatibility() {
$content = $this
->createEmbedCode([
'data-entity-type' => 'node',
'data-entity-uuid' => static::EMBEDDED_ENTITY_UUID,
'data-entity-embed-display' => 'default',
'data-entity-embed-display-settings' => '{"view_mode":"teaser"}',
]);
$this
->applyFilter($content);
$this
->assertHasAttributes($this
->cssSelect('div.embedded-entity')[0], [
'data-entity-type' => 'node',
'data-entity-uuid' => static::EMBEDDED_ENTITY_UUID,
'data-entity-embed-display' => 'entity_reference:entity_reference_entity_view',
'data-entity-embed-display-settings' => 'teaser',
'data-langcode' => 'en',
]);
}