You are here

protected static function FileProfilerStorageTest::cleanDir in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php \Symfony\Component\HttpKernel\Tests\Profiler\FileProfilerStorageTest::cleanDir()
2 calls to FileProfilerStorageTest::cleanDir()
FileProfilerStorageTest::setUpBeforeClass in vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php
FileProfilerStorageTest::tearDownAfterClass in vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php

File

vendor/symfony/http-kernel/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);
    }
  }
}