You are here

public function CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags in Drupal 8

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

@covers ::invalidateTags

File

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

Class

CacheTagsInvalidatorTest
@coversDefaultClass \Drupal\Core\Cache\CacheTagsInvalidator @group Cache

Namespace

Drupal\Tests\Core\Cache

Code

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