8000 [HttpKernel] change a class in tests to avoid depending on SQLite by fabpot · Pull Request #16009 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] change a class in tests to avoid depending on SQLite #16009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[HttpKernel] change a class in tests to avoid depending on SQLite
  • Loading branch information
fabpot committed Sep 30, 2015
commit d6a751792393b8af8d2703b7f9836d405b383a9a
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -60,16 +60,12 @@ public function testFindWorksWithInvalidDates()

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();
}

Expand Down
0