BlockContentContextualLinksTest.php in Drupal 10
File
core/modules/block_content/tests/src/Functional/BlockContentContextualLinksTest.php
View source
<?php
namespace Drupal\Tests\block_content\Functional;
class BlockContentContextualLinksTest extends BlockContentTestBase {
protected static $modules = [
'contextual',
];
protected $defaultTheme = 'stark';
public function testBlockContentContextualLinks() {
$block_content = $this
->createBlockContent();
$block = $this
->placeBlock('block_content:' . $block_content
->uuid());
$user = $this
->drupalCreateUser([
'administer blocks',
'access contextual links',
]);
$this
->drupalLogin($user);
$this
->drupalGet('<front>');
$this
->assertSession()
->elementAttributeContains('css', 'div[data-contextual-id]', 'data-contextual-id', 'block:block=' . $block
->id() . ':langcode=en|block_content:block_content=' . $block_content
->id() . ':');
}
}