function CacheCollectorHelper::setLoadedData
Same name and namespace in other branches
- main core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php \Drupal\Tests\Core\Cache\CacheCollectorHelper::setLoadedData()
Simulates having loaded a cache item with the given data, for unit tests.
Records the loaded data that ::updateCache() fingerprints and compares against to detect a concurrent change.
Parameters
array $data: The data the cache item would have contained when loaded.
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorHelper.php, line 79
Class
- CacheCollectorHelper
- Helper class to test the cache collector.
Namespace
Drupal\Tests\Core\CacheCode
public function setLoadedData(array $data) : void {
$this->loadedData = $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.