Mercurial > hg > isophonics-drupal-site
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php Mon Apr 23 09:46:53 2018 +0100 @@ -0,0 +1,36 @@ +<?php + +namespace Drupal\Tests\taxonomy\Functional; + +/** + * Tests views contextual links on terms. + * + * @group taxonomy + */ +class TermContextualLinksTest extends TaxonomyTestBase { + + /** + * {@inheritdoc} + */ + public static $modules = [ + 'contextual', + ]; + + /** + * Tests contextual links. + */ + public function testTermContextualLinks() { + $vocabulary = $this->createVocabulary(); + $term = $this->createTerm($vocabulary); + + $user = $this->drupalCreateUser([ + 'administer taxonomy', + 'access contextual links', + ]); + $this->drupalLogin($user); + + $this->drupalGet('taxonomy/term/' . $term->id()); + $this->assertSession()->elementAttributeContains('css', 'div[data-contextual-id]', 'data-contextual-id', 'taxonomy_term:taxonomy_term=' . $term->id() . ':'); + } + +}