You are here

protected function ProfilerTest::setUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php \Symfony\Component\HttpKernel\Tests\Profiler\ProfilerTest::setUp()

File

vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php, line 62

Class

ProfilerTest

Namespace

Symfony\Component\HttpKernel\Tests\Profiler

Code

protected function setUp() {
  if (!class_exists('SQLite3') && (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers()))) {
    $this
      ->markTestSkipped('This test requires SQLite support in your environment');
  }
  $this->tmp = tempnam(sys_get_temp_dir(), 'sf2_profiler');
  if (file_exists($this->tmp)) {
    @unlink($this->tmp);
  }
  $this->storage = new SqliteProfilerStorage('sqlite:' . $this->tmp);
  $this->storage
    ->purge();
}