public function ContentHubEntityEmbedHandlerTest::testGetReferencedUuids in Acquia Content Hub 8
Test for getReferencedUuids method.
@covers ::getReferencedUuids
File
- tests/
src/ Unit/ ContentHubEntityEmbedHandlerTest.php, line 78
Class
- ContentHubEntityEmbedHandlerTest
- PHPUnit for the ContentHubEntityEmbedHandler class.
Namespace
Drupal\Tests\acquia_contenthub\UnitCode
public function testGetReferencedUuids() {
$text = '<drupal-entity data-caption="some_image" data-embed-button="media_browser" data-entity-embed-display="view_mode:media.embedded" data-entity-type="media" data-entity-uuid="00000000-1111-0000-0000-000000000000"></drupal-entity>';
$uuids = $this->entityEmbedHandler
->getReferencedUuids($text);
$expected = [
"00000000-1111-0000-0000-000000000000",
];
$this
->assertEquals($expected, $uuids);
}