function TaxonomyVocabularyArgumentTest::testTermWithVocabularyArgument

Same name in other branches
  1. 8.9.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyVocabularyArgumentTest::testTermWithVocabularyArgument()
  2. 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyVocabularyArgumentTest::testTermWithVocabularyArgument()
  3. 11.x 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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.