if (!
$host =
getenv('POSTGRES_HOST'
)) { $this->
markTestSkipped('Missing POSTGRES_HOST env variable'
);
} return $host;
} public function getStore(): PersistingStoreInterface
{ $host =
$this->
getPostgresHost();
return new PostgreSqlStore('pgsql:host='.
$host,
['db_username' => 'postgres', 'db_password' => 'password'
]);
} /**
* @requires extension pdo_sqlite
*/
public function testInvalidDriver() { $store =
new PostgreSqlStore('sqlite:/tmp/foo.db'
);
$this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('The adapter "Symfony\Component\Lock\Store\PostgreSqlStore" does not support'
);