outline-8.x-1.x-dev/tests/src/Functional/EntryContextualLinksTest.php
tests/src/Functional/EntryContextualLinksTest.php
<?php
namespace Drupal\Tests\outline\Functional;
/**
* Tests views contextual links on entries.
*
* @group outline
*/
class EntryContextualLinksTest extends OutlineTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'contextual',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests contextual links.
*/
public function testEntryContextualLinks() {
$outline = $this->createOutline();
$entry = $this->createEntry($outline);
$user = $this->drupalCreateUser([
'administer outline',
'access contextual links',
]);
$this->drupalLogin($user);
$this->drupalGet('outline/entry/' . $entry->id());
$this->assertSession()->elementAttributeContains('css', 'div[data-contextual-id]', 'data-contextual-id', 'outline_entry:outline_entry=' . $entry->id() . ':');
}
}
