diff --git a/src/Tests/EntityEmbedFilterTest.php b/src/Tests/EntityEmbedFilterTest.php index 95bfa38..ce77ea8 100644 --- a/src/Tests/EntityEmbedFilterTest.php +++ b/src/Tests/EntityEmbedFilterTest.php @@ -46,6 +46,7 @@ class EntityEmbedFilterTest extends EntityEmbedTestBase { $this->assertNoRaw('assertText($this->node->body->value, 'Embedded node exists in page'); $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.'); + $this->assertRaw('
', 'Embed container found.'); // Tests entity embed using entity UUID and view mode. $content = 'This placeholder should not be rendered.'; @@ -58,6 +59,7 @@ class EntityEmbedFilterTest extends EntityEmbedTestBase { $this->assertNoRaw('assertText($this->node->body->value, 'Embedded node exists in page.'); $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.'); + $this->assertRaw('
', 'Embed container found.'); // Ensure that placeholder is not replaced when embed is unsuccessful. $content = 'This placeholder should be rendered since specified entity does not exists.'; @@ -83,6 +85,7 @@ class EntityEmbedFilterTest extends EntityEmbedTestBase { $this->assertText($this->node->body->value, 'Entity specifed with UUID exists in the page.'); $this->assertNoText($sample_node->body->value, 'Entity specifed with ID does not exists in the page.'); $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.'); + $this->assertRaw('
node->uuid() . '" data-entity-embed-display="default" data-entity-embed-settings=\'{"view_mode":"teaser"}\'>This placeholder should not be rendered.'; @@ -94,6 +97,7 @@ class EntityEmbedFilterTest extends EntityEmbedTestBase { $this->drupalGet('node/' . $node->id()); $this->assertText($this->node->body->value, 'Embedded node exists in page.'); $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.'); + $this->assertRaw('
drupalGet('node/' . $node->id()); $this->assertText($this->node->body->value, 'Embedded node exists in page with the view mode specified by entity-embed-settings.'); $this->assertNoText(strip_tags($content), 'Placeholder does not appear in the output when embed is successful.'); + $this->assertRaw('
drupalGet('node/' . $this->node->id()); @@ -150,6 +155,7 @@ class EntityEmbedFilterTest extends EntityEmbedTestBase { $this->assertRaw('data-align="left"', 'Alignment information found.'); $this->assertTrue((bool) $this->xpath("//img[@alt='This is alt text']"), 'Alt text found'); $this->assertTrue((bool) $this->xpath("//img[@title='This is title text']"), 'Title text found'); + $this->assertRaw('