public function CacheCacheTagsChecksumTests::testTagInvalidations in Supercache 8
Same name and namespace in other branches
- 2.0.x src/Tests/Cache/CacheCacheTagsChecksumTests.php \Drupal\supercache\Tests\Cache\CacheCacheTagsChecksumTests::testTagInvalidations()
Test that tag invalidations work.
Overrides CacheTagsChecksumTests::testTagInvalidations
File
- src/
Tests/ Cache/ CacheCacheTagsChecksumTests.php, line 40
Class
- CacheCacheTagsChecksumTests
- Test this on top of different combinations of cache backends.
Namespace
Drupal\supercache\Tests\CacheCode
public function testTagInvalidations() {
foreach ($this->backends as $backend) {
/** @var \Drupal\supercache\Cache\CacheRawFactoryInterface */
$factory = $this->container
->get($backend);
// Invalidator and provider on top of the cache.
$provider = new CacheCacheTagsChecksum($factory);
$this->tagInvalidator = $provider;
$this->tagChecksum = $provider;
// The backend factory will be the same for all
$connection = \Drupal\Core\Database\Database::getConnection();
$this->backendFactory = new DatabaseBackendFactory($connection, $this->tagChecksum);
// Call parent tests.
parent::testTagInvalidations();
}
}