TermContextualLinksTest.php in Drupal 10
File
core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php
View source
<?php
namespace Drupal\Tests\taxonomy\Functional;
class TermContextualLinksTest extends TaxonomyTestBase {
protected static $modules = [
'contextual',
];
protected $defaultTheme = 'stark';
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()
->elementExists('css', 'div[data-contextual-id^="taxonomy_term:taxonomy_term=' . $term
->id() . ':"]');
}
}