3 namespace Drupal\Tests\taxonomy\Functional;
6 * Tests views contextual links on terms.
10 class TermContextualLinksTest extends TaxonomyTestBase {
15 public static $modules = [
20 * Tests contextual links.
22 public function testTermContextualLinks() {
23 $vocabulary = $this->createVocabulary();
24 $term = $this->createTerm($vocabulary);
26 $user = $this->drupalCreateUser([
27 'administer taxonomy',
28 'access contextual links',
30 $this->drupalLogin($user);
32 $this->drupalGet('taxonomy/term/' . $term->id());
33 $this->assertSession()->elementAttributeContains('css', 'div[data-contextual-id]', 'data-contextual-id', 'taxonomy_term:taxonomy_term=' . $term->id() . ':');