function CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php \Drupal\Tests\Core\Cache\CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags()
  2. 8.9.x core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php \Drupal\Tests\Core\Cache\CacheTagsInvalidatorTest::testInvalidateTagsWithInvalidTags()
  3. 11.x 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 21

Class

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

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.