You are here

public function RenderCacheBackendAdapterTest::test_getMultiple in Render cache 7.2

Tests that RenderCacheBackendAdapter::getMultiple() is working properly. @covers ::getMultiple()

File

tests/src/Cache/RenderCacheBackendAdapterTest.php, line 224
Contains \Drupal\render_cache\Tests\Cache\RenderCacheBackendAdapterTest

Class

RenderCacheBackendAdapterTest
@coversDefaultClass \Drupal\render_cache\Cache\RenderCacheBackendAdapter @group cache

Namespace

Drupal\render_cache\Tests\Cache

Code

public function test_getMultiple() {
  $cache_info_map = array(
    '42' => $this
      ->getCacheInfo('render:foo:exists', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER),
    '23' => $this
      ->getCacheInfo('render:foo:not_exists', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER),
  );
  $this
    ->assertEquals(array(
    '42' => $this->cacheHitData->data,
  ), $this->cache
    ->getMultiple($cache_info_map), 'Cache data matches for ::getMultiple()');
}