Skip to content

Commit a0d064c

Browse files
committed
Fixing tests - passing pdo is not wrapped for some reason in dbal
1 parent 7935cda commit a0d064c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Tests/Transport/Doctrine/DoctrineIntegrationTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@ public function cleanup()
3737
*/
3838
public function createConnection()
3939
{
40-
if ($dsn = getenv('MESSENGER_DOCTRINE_DSN')) {
41-
$this->driverConnection = DriverManager::getConnection(['url' => $dsn]);
42-
} else {
43-
$this->driverConnection = DriverManager::getConnection(['pdo' => new \PDO('sqlite:'.sys_get_temp_dir().'/symfony.messenger.sqlite')]);
44-
}
40+
$dsn = getenv('MESSENGER_DOCTRINE_DSN') ?: 'sqlite:///'.sys_get_temp_dir().'/symfony.messenger.sqlite';
41+
$this->driverConnection = DriverManager::getConnection(['url' => $dsn]);
4542
$this->connection = new Connection([], $this->driverConnection);
4643
// call send to auto-setup the table
4744
$this->connection->setup();

0 commit comments

Comments
 (0)