8000 minor #16009 [HttpKernel] change a class in tests to avoid depending … · symfony/symfony@5e46485 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e46485

Browse files
committed
minor #16009 [HttpKernel] change a class in tests to avoid depending on SQLite (fabpot)
This PR was merged into the 2.3 branch. Discussion ---------- [HttpKernel] change a class in tests to avoid depending on SQLite | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- d6a7517 [HttpKernel] change a class in tests to avoid depending on SQLite
2 parents 7512c04 + d6a7517 commit 5e46485

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\HttpKernel\Tests\Profiler;
1313

1414
use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector;
15-
use Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage;
15+
use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage;
1616
use Symfony\Component\HttpKernel\Profiler\Profiler;
1717
use Symfony\Component\HttpFoundation\Request;
1818
use Symfony\Component\HttpFoundation\Response;
@@ -60,16 +60,12 @@ public function testFindWorksWithInvalidDates()
6060

6161
protected function setUp()
6262
{
63-
if (!class_exists('SQLite3') && (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers()))) {
64-
$this->markTestSkipped('This test requires SQLite support in your environment');
65-
}
66-
6763
$this->tmp = tempnam(sys_get_temp_dir(), 'sf2_profiler');
6864
if (file_exists($this->tmp)) {
6965
@unlink($this->tmp);
7066
}
7167

72-
$this->storage = new SqliteProfilerStorage('sqlite:'.$this->tmp);
68+
$this->storage = new FileProfilerStorage('file:'.$this->tmp);
7369
$this->storage->purge();
7470
}
7571

0 commit comments

Comments
 (0)
0