diff --git a/src/Container/PostgresContainer.php b/src/Container/PostgresContainer.php index 9d14a33..15f3553 100644 --- a/src/Container/PostgresContainer.php +++ b/src/Container/PostgresContainer.php @@ -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 diff --git a/tests/Integration/ContainerTest.php b/tests/Integration/ContainerTest.php index a647024..c7cd88a 100644 --- a/tests/Integration/ContainerTest.php +++ b/tests/Integration/ContainerTest.php @@ -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);