From a7cf3f997aa14aa34def075077a3c9962ca7e9f5 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 10 May 2019 14:00:00 -0400 Subject: [PATCH] Fixing tests - passing pdo is not wrapped for some reason in dbal --- .../Tests/Transport/Doctrine/DoctrineIntegrationTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php index aca22cf636..6770733964 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php @@ -37,11 +37,8 @@ class DoctrineIntegrationTest extends TestCase */ public function createConnection() { - if ($dsn = getenv('MESSENGER_DOCTRINE_DSN')) { - $this->driverConnection = DriverManager::getConnection(['url' => $dsn]); - } else { - $this->driverConnection = DriverManager::getConnection(['pdo' => new \PDO('sqlite:'.sys_get_temp_dir().'/symfony.messenger.sqlite')]); - } + $dsn = getenv('MESSENGER_DOCTRINE_DSN') ?: 'sqlite:///'.sys_get_temp_dir().'/symfony.messenger.sqlite'; + $this->driverConnection = DriverManager::getConnection(['url' => $dsn]); $this->connection = new Connection([], $this->driverConnection); // call send to auto-setup the table $this->connection->setup();