You are here

public function TaxonomyVocabularyArgumentTest::testTermWithVocabularyArgument in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyVocabularyArgumentTest::testTermWithVocabularyArgument()

Tests the vocabulary argument handler.

See also

Drupal\taxonomy\Plugin\views\argument\VocabularyVid

File

core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php, line 73

Class

TaxonomyVocabularyArgumentTest
Tests the vocabulary argument.

Namespace

Drupal\Tests\taxonomy\Functional\Views

Code

public function testTermWithVocabularyArgument() {
  $this
    ->drupalGet('test_argument_taxonomy_vocabulary/' . $this->vocabularies[0]
    ->id());

  // First term should be present.
  $this
    ->assertSession()
    ->pageTextContains($this->terms[0]
    ->label());

  // Second term should not be present.
  $this
    ->assertSession()
    ->pageTextNotContains($this->terms[1]
    ->label());
}