Hostnet\Bundle\WebpackBundle\CacheWarmer\WebpackCompileCacheWarmer::isOptional PHP Method

isOptional() public method

public isOptional ( )
    public function isOptional()
    {
        return true;
    }

Usage Example

 /**
  * Simple test to see the guard is executed from the cache warmer.
  */
 public function testWebpackCompileCacheWarmer()
 {
     $guard = $this->prophesize(CacheGuard::class);
     $guard->rebuild()->shouldBeCalled();
     $webpack_compile_cache_warmer = new WebpackCompileCacheWarmer($guard->reveal());
     //Cache warmer is optional...
     self::assertTrue($webpack_compile_cache_warmer->isOptional());
     $webpack_compile_cache_warmer->warmUp(sys_get_temp_dir());
 }
WebpackCompileCacheWarmer