public function testMissingEntityIndicator($uuid, array
$filter_ids, array
$additional_attributes) { $content =
$this->
createEmbedCode([ 'data-entity-type' => 'media',
'data-entity-uuid' =>
$uuid,
'data-view-mode' => 'foobar',
] +
$additional_attributes);
// If the UUID being used in the embed is that of the sample entity, first
// assert that it currently results in a functional embed, then delete it.
if ($uuid ===
static::EMBEDDED_ENTITY_UUID
) { $result =
$this->
processText($content, 'en',
$filter_ids);
$this->
setRawContent($result->
getProcessedText());
$this->
assertCount(1,
$this->
cssSelect('div[data-media-embed-test-view-mode="foobar"]'
));
$this->embeddedEntity->
delete();
} $result =
$this->
processText($content, 'en',
$filter_ids);
$this->
setRawContent($result->
getProcessedText());
$this->
assertCount(0,
$this->
cssSelect('div[data-media-embed-test-view-mode="foobar"]'
));
$this->
assertCount(1,
$this->
cssSelect('div.this-error-message-is-themeable'
));
if (in_array('filter_align',
$filter_ids, TRUE
) && !
empty($additional_attributes['data-align'
])) { $this->
assertCount(1,
$this->
cssSelect('div.align-' .
$additional_attributes['data-align'
]));
} }