function CachePreWarmerTest::testNoServices
File
-
core/
tests/ Drupal/ Tests/ Core/ PreWarm/ CachePreWarmerTest.php, line 29
Class
- CachePreWarmerTest
- @coversDefaultClass \Drupal\Core\PreWarm\CachePreWarmer @group PreWarm
Namespace
Drupal\Tests\Core\PreWarmCode
public function testNoServices() : void {
$classResolver = $this->createMock(ClassResolverInterface::class);
$classResolver->expects($this->never())
->method('getInstanceFromDefinition');
$prewarmer = new CachePreWarmer($classResolver, []);
$this->assertFalse($prewarmer->preWarmOneCache());
$this->assertFalse($prewarmer->preWarmAllCaches());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.