You are here

public function RenderCacheBackendAdapterTest::test_get_hit in Render cache 7.2

Tests that RenderCacheBackendAdapter::get() is working properly. @covers ::__construct() @covers ::get() @covers ::getCacheId()

File

tests/src/Cache/RenderCacheBackendAdapterTest.php, line 176
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_get_hit() {
  $cache_info = $this
    ->getCacheInfo('render:foo:exists', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER);
  $this
    ->assertEquals($this->cacheHitData->data, $this->cache
    ->get($cache_info), 'Cache Hit Data matches for ::get()');
}