You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2018. It is now read-only.
// Tests entity embed using entity UUID and view mode.
37
52
$content = '<drupal-entity data-entity-type="node" data-entity-uuid="' . $this->node->uuid() . '" data-view-mode="teaser">This placeholder should not be rendered.</drupal-entity>';
// Ensure that placeholder is not replaced when embed is unsuccessful.
49
65
$content = '<drupal-entity data-entity-type="node" data-entity-id="InvalidID" data-view-mode="teaser">This placeholder should be rendered since specified entity does not exists.</drupal-entity>';
@@ -69,6 +85,7 @@ public function testFilter() {
69
85
$this->assertText($this->node->body->value, 'Entity specifed with UUID exists in the page.');
70
86
$this->assertNoText($sample_node->body->value, 'Entity specifed with ID does not exists in the page.');
71
87
$this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.');
// Test that attributes are correctly added when image formatter is used.
142
+
/** @var \Drupal\file\FileInterface $image */
143
+
$image = $this->getTestFile('image');
144
+
$image->setPermanent();
145
+
$image->save();
146
+
$content = '<drupal-entity data-entity-type="file" data-entity-uuid="' . $image->uuid() . '" data-entity-embed-display="image:image" data-entity-embed-settings=\'{"image_style":"","image_link":""}\' data-align="left" data-caption="test caption" alt="This is alt text" title="This is title text">This placeholder should not be rendered.</drupal-entity>';
0 commit comments