Skip to content

Commit

Permalink
Simplify and improve bootstrap server var handling
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 committed Jan 3, 2025
1 parent 43b7f6e commit cf73ed0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

use Symfony\Component\Process\Process;

$fixturesHost = $_SERVER['WEB_FIXTURES_HOST'] ?? '//host:8002';
if (!is_string($fixturesHost)) {
throw new RuntimeException('The fixtures host must be specified in $_SERVER[WEB_FIXTURES_HOST] as a string');
}
$minkTestServerPort = parse_url($fixturesHost, PHP_URL_PORT);
$fixturesHost = $_SERVER['WEB_FIXTURES_HOST'] ?? '';
$minkTestServerPort = parse_url(is_string($fixturesHost) ? $fixturesHost : '', PHP_URL_PORT) ?: '8002';

$minkTestServer = new Process([
PHP_BINARY,
Expand Down

0 comments on commit cf73ed0

Please sign in to comment.