public function RenderCacheBackendAdapterTest::test_set in Render cache 7.2
Tests that RenderCacheBackendAdapter::set() is working properly. @covers ::set() @covers ::preserveProperties()
File
- tests/
src/ Cache/ RenderCacheBackendAdapterTest.php, line 196 - Contains \Drupal\render_cache\Tests\Cache\RenderCacheBackendAdapterTest
Class
- RenderCacheBackendAdapterTest
- @coversDefaultClass \Drupal\render_cache\Cache\RenderCacheBackendAdapter @group cache
Namespace
Drupal\render_cache\Tests\CacheCode
public function test_set() {
$cache_info = $this
->getCacheInfo('render:foo:bar', RenderCache::RENDER_CACHE_STRATEGY_NO_RENDER);
// Also test that there are no properties to preserve.
$cache_info['render_cache_preserve_properties'] = array();
$render = $this->cacheHitData->data;
$this->cache
->set($render, $cache_info);
$this
->assertEquals($this->cacheHitNoRender, $render, 'Data is the same for no render strategy');
}