new deployer command

This commit is contained in:
Mark Gregory
2026-09-16 11:53:35 +01:00
parent 5aeeb87b21
commit ce79962289
14 changed files with 31 additions and 43 deletions
+4 -3
View File
@@ -10,6 +10,7 @@ use PHPUnit\Framework\Attributes\BeforeClass;
abstract class DuskTestCase extends BaseTestCase
{
private const LOOPBACK = self::LOOPBACK;
use CreatesApplication;
/**
@@ -31,7 +32,7 @@ abstract class DuskTestCase extends BaseTestCase
if (! static::runningInSail()) {
static::ensureChromeDriverBinaryAlias();
static::startChromeDriver(['--port=9515']);
static::waitForTcpPort('127.0.0.1', 9515, 8.0, 'ChromeDriver');
static::waitForTcpPort(self::LOOPBACK, 9515, 8.0, 'ChromeDriver');
}
}
@@ -98,7 +99,7 @@ abstract class DuskTestCase extends BaseTestCase
$parts = parse_url($url);
$scheme = $parts['scheme'] ?? 'http';
$host = $parts['host'] ?? '127.0.0.1';
$host = $parts['host'] ?? self::LOOPBACK;
$port = (int) ($parts['port'] ?? ($scheme === 'https' ? 443 : 80));
$useExternalServer = filter_var(
@@ -191,7 +192,7 @@ abstract class DuskTestCase extends BaseTestCase
private static function availablePort(int $from, int $to): int
{
for ($port = $from; $port <= $to; $port++) {
if (! static::canConnect('127.0.0.1', $port)) {
if (! static::canConnect(self::LOOPBACK, $port)) {
return $port;
}
}