[HttpKernel] change a class in tests to avoid depending on SQLite
This commit is contained in:
parent
d8dc8f27fd
commit
d6a7517923
|
@ -12,7 +12,7 @@
|
|||
namespace Symfony\Component\HttpKernel\Tests\Profiler;
|
||||
|
||||
use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector;
|
||||
use Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage;
|
||||
use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage;
|
||||
use Symfony\Component\HttpKernel\Profiler\Profiler;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
@ -60,16 +60,12 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
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 = new FileProfilerStorage('file:'.$this->tmp);
|
||||
$this->storage->purge();
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue