You are here

public function ChainedStorageTests::testKeyValue in Supercache 2.0.x

Same name and namespace in other branches
  1. 8 src/Tests/KeyValue/ChainedStorageTests.php \Drupal\supercache\Tests\KeyValue\ChainedStorageTests::testKeyValue()

Test that tag invalidations work.

Overrides KeyValueTests::testKeyValue

File

src/Tests/KeyValue/ChainedStorageTests.php, line 38

Class

ChainedStorageTests
Test this on top of different combinations of cache backends.

Namespace

Drupal\supercache\Tests\KeyValue

Code

public function testKeyValue() {

  // The good thing of this is that besides testing
  // the storage, we also test ALL the cache backend
  // implementations.
  foreach ($this->backends as $backend) {
    $connection = \Drupal\Core\Database\Database::getConnection();
    $factory = $this->container
      ->get($backend);
    $serializer = new \Drupal\Component\Serialization\PhpSerialize();
    $this->factory = new KeyValueChainedFactory($factory, $serializer, $connection);

    // Call the real test.
    parent::testKeyValue();
  }
}