- Move most of the stuff for backwards compatibility support into one class

- Added random port logic
- Updated wait wtrategies
- API alignments to make it similar to other official implementations
- ...
This commit is contained in:
Sergei Shitikov
2024-09-06 19:08:37 +02:00
parent a956794279
commit f05ea0020d
43 changed files with 1191 additions and 601 deletions
+6 -2
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Testcontainers\Tests\Integration;
use Testcontainers\Container\MySQLContainer;
use Testcontainers\Modules\MySQLContainer;
class MySQLContainerTest extends ContainerTestCase
{
@@ -19,7 +19,11 @@ class MySQLContainerTest extends ContainerTestCase
public function testMySQLContainer(): void
{
$pdo = new \PDO(
sprintf('mysql:host=%s;port=3306', '127.0.0.1'),
sprintf(
'mysql:host=%s;port=%d',
self::$container->getHost(),
self::$container->getFirstMappedPort()
),
'bar',
'baz',
);