public function RenderCacheBackendAdapterTest::test_set_exception in Render cache 7.2
Tests that RenderCacheBackendAdapter::set() throwing an exception. @expectedException \RunTimeException @covers ::set()
File
- tests/
src/ Cache/ RenderCacheBackendAdapterTest.php, line 210 - 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_exception() {
$cache_info = $this
->getCacheInfo('render:foo:bar', -1);
$render = array();
// Ensure cache() was called one times ...
$this->cache
->get($cache_info);
// ... because this throws an exception.
$this->cache
->set($render, $cache_info);
}