Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4f65a9c

Browse filesBrowse files
minor #48107 [Messenger] Use :memory: for SQLite tests (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] Use :memory: for SQLite tests | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- c40af2d [Messenger] Use :memory: for SQLite tests
2 parents 74042bd + c40af2d commit 4f65a9c
Copy full SHA for 4f65a9c

File tree

Expand file treeCollapse file tree

1 file changed

+1
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-7
lines changed

‎src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php
+1-7Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,17 @@ class DoctrineIntegrationTest extends TestCase
2828
private $driverConnection;
2929
/** @var Connection */
3030
private $connection;
31-
/** @var string */
32-
private $sqliteFile;
3331

3432
protected function setUp(): void
3533
{
36-
$this->sqliteFile = sys_get_temp_dir().'/symfony.messenger.sqlite';
37-
$dsn = getenv('MESSENGER_DOCTRINE_DSN') ?: 'sqlite:///'.$this->sqliteFile;
34+
$dsn = getenv('MESSENGER_DOCTRINE_DSN') ?: 'sqlite://:memory:';
3835
$this->driverConnection = DriverManager::getConnection(['url' => $dsn]);
3936
$this->connection = new Connection([], $this->driverConnection);
4037
}
4138

4239
protected function tearDown(): void
4340
{
4441
$this->driverConnection->close();
45-
if (file_exists($this->sqliteFile)) {
46-
@unlink($this->sqliteFile);
47-
}
4842
}
4943

5044
public function testConnectionSendAndGet()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.