mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-11-07 17:02:38 +00:00
refactor Container to GenericContainer for better align to other Testcontainers language packages
This commit is contained in:
@@ -23,7 +23,7 @@ use Testcontainers\Wait\WaitInterface;
|
||||
* @phpstan-type ContainerInspect ContainerInspectSingleNetwork|ContainerInspectMultipleNetworks
|
||||
* @phpstan-type DockerNetwork array{CreatedAt: string, Driver: string, ID: string, IPv6: string, Internal: string, Labels: string, Name: string, Scope: string}
|
||||
*/
|
||||
class Container
|
||||
class GenericContainer
|
||||
{
|
||||
protected Docker $dockerClient;
|
||||
|
||||
@@ -67,7 +67,7 @@ class Container
|
||||
|
||||
public static function make(string $image): self
|
||||
{
|
||||
return new Container($image);
|
||||
return new GenericContainer($image);
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
@@ -6,7 +6,7 @@ namespace Testcontainers\Container;
|
||||
|
||||
use Testcontainers\Wait\WaitForExec;
|
||||
|
||||
class MariaDBContainer extends Container
|
||||
class MariaDBContainer extends GenericContainer
|
||||
{
|
||||
private function __construct(string $version, string $mysqlRootPassword)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Testcontainers\Container;
|
||||
|
||||
use Testcontainers\Wait\WaitForExec;
|
||||
|
||||
class MySQLContainer extends Container
|
||||
class MySQLContainer extends GenericContainer
|
||||
{
|
||||
private function __construct(string $version, string $mysqlRootPassword)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Testcontainers\Container;
|
||||
|
||||
use Testcontainers\Wait\WaitForHttp;
|
||||
|
||||
class OpenSearchContainer extends Container
|
||||
class OpenSearchContainer extends GenericContainer
|
||||
{
|
||||
private function __construct(string $version)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Testcontainers\Container;
|
||||
|
||||
use Testcontainers\Wait\WaitForExec;
|
||||
|
||||
class PostgresContainer extends Container
|
||||
class PostgresContainer extends GenericContainer
|
||||
{
|
||||
private function __construct(string $version, string $rootPassword)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Testcontainers\Container;
|
||||
|
||||
use Testcontainers\Wait\WaitForLog;
|
||||
|
||||
class RedisContainer extends Container
|
||||
class RedisContainer extends GenericContainer
|
||||
{
|
||||
private function __construct(string $version)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user