Author: Henrik Bjornskov (henrik@bjrnskov.dk)
Inheritance: implements Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface
コード例 #1
0
 public function testShouldCreatePaths()
 {
     if (!is_writable(sys_get_temp_dir())) {
         $this->markTestSkipped(sprintf('The system temp directory "%s" is not writeable for the current system user.', sys_get_temp_dir()));
     }
     $path = sys_get_temp_dir() . '/' . uniqid('htmlpurifierbundle');
     $cacheWarmer = new SerializerCacheWarmer(array($path), new \HTMLPurifier());
     $cacheWarmer->warmUp(null);
     $this->assertTrue(is_dir($path));
     $this->assertTrue(is_writeable($path));
     rmdir($path);
 }