Skip to content

Commit

Permalink
Merge pull request #4 from aliyome/main
Browse files Browse the repository at this point in the history
docs: use make method instead of new
  • Loading branch information
shyim authored Jan 14, 2024
2 parents 7ab7298 + db77327 commit bfbaf8a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ composer req --dev shyim/testcontainer

use Testcontainer\Container\MySQLContainer;

$container = new Container('nginx:alpine');
$container = Container::make('nginx:alpine');

// set an environment variable
$container->withEnvironment('name', 'var');
Expand Down Expand Up @@ -62,7 +62,7 @@ $container->withWait(new WaitForHealthCheck());

use Testcontainer\Container\MySQLContainer;

$container = new MySQLContainer('8.0');
$container = MySQLContainer::make('8.0');
$container->withMySQLDatabase('foo');
$container->withMySQLUser('bar', 'baz');

Expand All @@ -84,7 +84,7 @@ $pdo = new \PDO(

use Testcontainer\Container\MariaDBContainer;

$container = new MariaDBContainer('8.0');
$container = MariaDBContainer::make('8.0');
$container->withMariaDBDatabase('foo');
$container->withMariaDBUser('bar', 'baz');

Expand All @@ -106,7 +106,7 @@ $pdo = new \PDO(

use Testcontainer\Container\PostgresContainer;

$container = new PostgresContainer('15.0', 'password');
$container = PostgresContainer::make('15.0', 'password');
$container->withPostgresDatabase('database');
$container->withPostgresUser('username');

Expand All @@ -127,7 +127,7 @@ $pdo = new \PDO(

use Testcontainer\Container\RedisContainer;

$container = new RedisContainer('6.0');
$container = RedisContainer::make('6.0');

$container->run();

Expand All @@ -143,7 +143,7 @@ $redis->connect($container->getAddress());

use Testcontainer\Container\OpenSearchContainer;

$container = new OpenSearchContainer('2');
$container = OpenSearchContainer::make('2');
$container->disableSecurityPlugin();

$container->run();
Expand Down

0 comments on commit bfbaf8a

Please sign in to comment.