mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-08 16:29:29 +00:00
remove forgotten legacy part, adjust doc
This commit is contained in:
@@ -43,6 +43,7 @@ use Testcontainers\Wait\WaitForExec;
|
||||
use Testcontainers\Wait\WaitForLog;
|
||||
use Testcontainers\Wait\WaitForHttp;
|
||||
use Testcontainers\Wait\WaitForHealthCheck;
|
||||
use Testcontainers\Wait\WaitForHostPort;
|
||||
|
||||
$container = new GenericContainer('nginx:alpine');
|
||||
|
||||
@@ -58,7 +59,10 @@ $container->withWait(new WaitForLog('Ready to accept connections'));
|
||||
|
||||
|
||||
// Wait for an http request to succeed
|
||||
$container->withWait(WaitForHttp::make($port, $method = 'GET', $path = '/'));
|
||||
$container->withWait(new WaitForHttp($port, $method = 'GET', $path = '/'));
|
||||
|
||||
// Wait for all bound ports to be open
|
||||
$container->withWait(new WaitForHostPort());
|
||||
|
||||
// Wait until the docker heartcheck is green
|
||||
$container->withWait(new WaitForHealthCheck());
|
||||
|
||||
Reference in New Issue
Block a user