mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-08 17:29:29 +00:00
Implement WaitForExec using new Client library. Add BaseWait to avoid some code duplication. Adjust Postgres test
This commit is contained in:
@@ -10,8 +10,8 @@ class PostgreSQLContainerTest extends ContainerTestCase
|
||||
{
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
self::$container = (new PostgresContainer('latest', 'test'))
|
||||
->withPostgresUser('test')
|
||||
self::$container = (new PostgresContainer())
|
||||
->withPostgresUser('bar')
|
||||
->withPostgresDatabase('foo')
|
||||
->start();
|
||||
}
|
||||
@@ -19,8 +19,8 @@ class PostgreSQLContainerTest extends ContainerTestCase
|
||||
public function testPostgreSQLContainer(): void
|
||||
{
|
||||
$pdo = new \PDO(
|
||||
sprintf('pgsql:host=%s;port=5432;dbname=foo', self::$container->getAddress()),
|
||||
'test',
|
||||
'pgsql:host=127.0.0.1;port=5432;dbname=foo',
|
||||
'bar',
|
||||
'test',
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user