Fix WaitForLog implementation

This commit is contained in:
Sergei Shitikov
2024-09-01 15:18:05 +02:00
parent 5ee4fdc804
commit de66ea607c
3 changed files with 55 additions and 13 deletions
@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Testcontainers\Exception;
class ContainerWaitingTimeoutException extends \RuntimeException
{
protected string $containerId;
public function __construct(string $containerId, ?string $message = null, ?\Throwable $previous = null)
{
$this->containerId = $containerId;
$message ??= sprintf('Timeout reached while waiting for container %s', $containerId);
parent::__construct($message, 0, $previous);
}
public function getContainerId(): string
{
return $this->containerId;
}
}