class RenderCachePlaceholderMock in Render cache 7.2
Hierarchy
- class \Drupal\render_cache\Cache\RenderCachePlaceholder implements RenderCachePlaceholderInterface
- class \Drupal\render_cache\Tests\Cache\RenderCachePlaceholderMock
Expanded class hierarchy of RenderCachePlaceholderMock
File
- tests/
src/ Cache/ RenderCachePlaceholderTest.php, line 274 - Contains \Drupal\render_cache\Tests\Cache\RenderCachePlaceholderTest
Namespace
Drupal\render_cache\Tests\CacheView source
class RenderCachePlaceholderMock extends RenderCachePlaceholder {
/**
* A mock that retrieves static calls we override.
*
* @var object
*/
public static $mock;
/**
* {@inheritdoc}
*/
protected static function generatePlaceholder($callback, array &$context) {
return static::$mock
->generatePlaceholder($callback, $context);
}
/**
* {@inheritdoc}
*/
protected static function drupalRender(array &$elements) {
return static::$mock
->drupalRender($elements);
}
/**
* Helper to return the class of the class.
*
* @return string
* Returns what the class was called as.
*/
public static function helper_getClass() {
return get_called_class();
}
}