function MediaEmbedFilterTest::testOnlyDrupalMediaTagProcessed
Tests that only <drupal-media> tags are processed.
File
-
core/
modules/ media/ tests/ src/ Kernel/ MediaEmbedFilterTest.php, line 364
Class
- MediaEmbedFilterTest
- @coversDefaultClass \Drupal\media\Plugin\Filter\MediaEmbed[[api-linebreak]] @group media @group #slow
Namespace
Drupal\Tests\media\KernelCode
public function testOnlyDrupalMediaTagProcessed() : void {
$content = $this->createEmbedCode([
'data-entity-type' => 'media',
'data-entity-uuid' => $this->embeddedEntity
->uuid(),
]);
$content = str_replace('drupal-media', 'drupal-entity', $content);
$filter_result = $this->processText($content, 'en', [
'media_embed',
]);
// If input equals output, the filter didn't change anything.
$this->assertSame($content, $filter_result->getProcessedText());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.