protected static function FileProfilerStorageTest::cleanDir

2 calls to FileProfilerStorageTest::cleanDir()
FileProfilerStorageTest::setUpBeforeClass in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
FileProfilerStorageTest::tearDownAfterClass in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php, line 22

Class

FileProfilerStorageTest

Namespace

Symfony\Component\HttpKernel\Tests\Profiler

Code

protected static function cleanDir() {
  $flags = \FilesystemIterator::SKIP_DOTS;
  $iterator = new \RecursiveDirectoryIterator(self::$tmpDir, $flags);
  $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
  foreach ($iterator as $file) {
    if (is_file($file)) {
      unlink($file);
    }
  }
}