fix: pdo_pgsql usage

This commit is contained in:
Steffen Beisenherz
2022-10-23 15:50:37 +00:00
parent 54c5d34886
commit a6c3c4daca
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -15,9 +15,9 @@ class PostgresContainer extends Container
$this->withWait(new WaitForExec(["pg_isready", "-h", "127.0.0.1"]));
}
public static function make(string $version = 'latest', string $mysqlRootPassword = 'root'): self
public static function make(string $version = 'latest', string $dbPassword = 'root'): self
{
return new self($version, $mysqlRootPassword);
return new self($version, $dbPassword);
}
public function withPostgresUser(string $username): self
+2 -2
View File
@@ -106,12 +106,12 @@ class ContainerTest extends TestCase
$pdo = new \PDO(
sprintf('postgres:host=%s;port=5432', $container->getAddress()),
sprintf('pgsql:host=%s;port=5432;dbname=foo', $container->getAddress()),
'test',
'test',
);
$query = $pdo->query('SHOW databases');
$query = $pdo->query('SELECT datname FROM pg_database');
$this->assertInstanceOf(\PDOStatement::class, $query);