function CachePreWarmerTest::testPreWarmAll
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/PreWarm/CachePreWarmerTest.php \Drupal\Tests\Core\PreWarm\CachePreWarmerTest::testPreWarmAll()
Tests pre warm all.
@legacy-covers ::preWarmAllCaches
File
-
core/
tests/ Drupal/ Tests/ Core/ PreWarm/ CachePreWarmerTest.php, line 107
Class
Namespace
Drupal\Tests\Core\PreWarmCode
public function testPreWarmAll() : void {
$this->setupCacheServices();
$preWarmer = new CachePreWarmer($this->classResolver, [
'service0',
'service1',
'service2',
'service3',
]);
$this->assertTrue($preWarmer->preWarmAllCaches());
foreach ($this->warmedMap as $service) {
$this->assertEquals(1, $this->warmedMap[$service]);
}
$this->assertFalse($preWarmer->preWarmAllCaches());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.