public function CacheWarmerAggregateTest::testWarmupDoesNotCallWarmupOnOptionalWarmersWhenEnableOptionalWarmersIsNotEnabled

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php, line 79

Class

CacheWarmerAggregateTest

Namespace

Symfony\Component\HttpKernel\Tests\CacheWarmer

Code

public function testWarmupDoesNotCallWarmupOnOptionalWarmersWhenEnableOptionalWarmersIsNotEnabled() {
  $warmer = $this
    ->getCacheWarmerMock();
  $warmer
    ->expects($this
    ->once())
    ->method('isOptional')
    ->will($this
    ->returnValue(true));
  $warmer
    ->expects($this
    ->never())
    ->method('warmUp');
  $aggregate = new CacheWarmerAggregate(array(
    $warmer,
  ));
  $aggregate
    ->warmUp(self::$cacheDir);
}