Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / taxonomy / tests / src / Functional / TermContextualLinksTest.php
1 <?php
2
3 namespace Drupal\Tests\taxonomy\Functional;
4
5 /**
6  * Tests views contextual links on terms.
7  *
8  * @group taxonomy
9  */
10 class TermContextualLinksTest extends TaxonomyTestBase {
11
12   /**
13    * {@inheritdoc}
14    */
15   public static $modules = [
16     'contextual',
17   ];
18
19   /**
20    * Tests contextual links.
21    */
22   public function testTermContextualLinks() {
23     $vocabulary = $this->createVocabulary();
24     $term = $this->createTerm($vocabulary);
25
26     $user = $this->drupalCreateUser([
27       'administer taxonomy',
28       'access contextual links',
29     ]);
30     $this->drupalLogin($user);
31
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() . ':');
34   }
35
36 }