function CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php \Drupal\Tests\Core\Cache\CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags()
  2. 9 core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php \Drupal\Tests\Core\Cache\CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags()
  3. 8.9.x core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php \Drupal\Tests\Core\Cache\CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags()

Tests invalidate tags with invalid tags.

File

core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php, line 24

Class

CacheTagsInvalidatorTest
Tests Drupal\Core\Cache\CacheTagsInvalidator.

Namespace

Drupal\Tests\Core\Cache

Code

public function testInvalidateTagsWithInvalidTags() : void {
  $cache_tags_invalidator = new CacheTagsInvalidator();
  $this->expectException(\AssertionError::class);
  $cache_tags_invalidator->invalidateTags([
    'node' => [
      2,
      3,
      5,
      8,
      13,
    ],
  ]);
}

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