function CachePreWarmerTest::testPreWarmAll

@covers ::preWarmAllCaches

File

core/tests/Drupal/Tests/Core/PreWarm/CachePreWarmerTest.php, line 98

Class

CachePreWarmerTest
@coversDefaultClass \Drupal\Core\PreWarm\CachePreWarmer @group PreWarm

Namespace

Drupal\Tests\Core\PreWarm

Code

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.