MediaEmbedFilterDisabledIntegrationsTest.php in Drupal 9
File
core/modules/media/tests/src/Kernel/MediaEmbedFilterDisabledIntegrationsTest.php
View source
<?php
namespace Drupal\Tests\media\Kernel;
class MediaEmbedFilterDisabledIntegrationsTest extends MediaEmbedFilterTestBase {
protected static $modules = [
'contextual',
'media_test_embed',
];
protected function setUp() : void {
parent::setUp();
$this->container
->get('current_user')
->addRole($this
->drupalCreateRole([
'access contextual links',
]));
}
public function testDisabledIntegrations() {
$text = $this
->createEmbedCode([
'data-entity-type' => 'media',
'data-entity-uuid' => static::EMBEDDED_ENTITY_UUID,
]);
$this
->applyFilter($text);
$this
->assertCount(1, $this
->cssSelect('div[data-media-embed-test-view-mode]'));
$this
->assertCount(0, $this
->cssSelect('div[data-media-embed-test-view-mode].contextual-region'));
}
}