Fixes in WaitForHealthCheck params and legacy tests

This commit is contained in:
Sergei Shitikov
2024-09-29 18:48:46 +02:00
parent 90edcd48f4
commit 49031990a2
3 changed files with 25 additions and 9 deletions
+3
View File
@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Testcontainers\Container;
use Testcontainers\Utils\PortGenerator\FixedPortGenerator;
/**
* Added for backward compatibility.
* @deprecated Use GenericContainer instead.
@@ -52,6 +54,7 @@ class Container extends GenericContainer
*/
public function withPort(string $localPort, string $containerPort): self
{
$this->withPortGenerator(new FixedPortGenerator([(int)$localPort]));
return $this->withExposedPorts($containerPort);
}