Skip to content

Commit

Permalink
Fixing tests - passing pdo is not wrapped for some reason in dbal
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed May 10, 2019
1 parent ca6266d commit a7cf3f9
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -37,11 +37,8 @@ public function cleanup()
*/
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();
Expand Down

0 comments on commit a7cf3f9

Please sign in to comment.