Mercurial > hg > isophonics-drupal-site
comparison core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
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 } |