function TaxonomyTermArgumentTidFromNodeTest::testCacheInvalidation

Same name and namespace in other branches
  1. 11.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentTidFromNodeTest.php \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTermArgumentTidFromNodeTest::testCacheInvalidation()

Tests cache invalidation.

File

core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentTidFromNodeTest.php, line 57

Class

TaxonomyTermArgumentTidFromNodeTest
Tests the taxonomy term with argument from a node page.

Namespace

Drupal\Tests\taxonomy\Functional\Views

Code

public function testCacheInvalidation() : void {
  $this->drupalGet($this->nodes[0]
    ->toUrl());
  $this->assertSession()
    ->pageTextContains($this->term1
    ->label());
  $this->nodes[0]
    ->set('field_views_testing_tags', [])
    ->save();
  $this->drupalGet($this->nodes[0]
    ->toUrl());
  $this->assertSession()
    ->pageTextNotContains($this->term1
    ->label());
}

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