class SqliteProfilerStorageTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Profiler/SqliteProfilerStorageTest.php \Symfony\Component\HttpKernel\Tests\Profiler\SqliteProfilerStorageTest
Hierarchy
- class \Symfony\Component\HttpKernel\Tests\Profiler\AbstractProfilerStorageTest extends \Symfony\Component\HttpKernel\Tests\Profiler\PHPUnit_Framework_TestCase
- class \Symfony\Component\HttpKernel\Tests\Profiler\SqliteProfilerStorageTest
Expanded class hierarchy of SqliteProfilerStorageTest
File
- vendor/
symfony/ http-kernel/ Tests/ Profiler/ SqliteProfilerStorageTest.php, line 16
Namespace
Symfony\Component\HttpKernel\Tests\ProfilerView source
class SqliteProfilerStorageTest extends AbstractProfilerStorageTest {
protected static $dbFile;
protected static $storage;
public static function setUpBeforeClass() {
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf2_sqlite_storage');
if (file_exists(self::$dbFile)) {
@unlink(self::$dbFile);
}
self::$storage = new SqliteProfilerStorage('sqlite:' . self::$dbFile);
}
public static function tearDownAfterClass() {
@unlink(self::$dbFile);
}
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');
}
self::$storage
->purge();
}
/**
* @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface
*/
protected function getStorage() {
return self::$storage;
}
}