From 18c94ae7a84fb374130255e9454fca08c49dd962 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 5 Oct 2026 12:16:03 +0300 Subject: [PATCH] Read "WEB_FIXTURES_BROWSER" from "$_SERVER" consistently Co-Authored-By: Claude Opus 5.5 --- phpunit.xml.dist | 4 ++++ tests/Selenium2Config.php | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f4974da9..6c3be1f1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -11,10 +11,14 @@ + + + + diff --git a/tests/Selenium2Config.php b/tests/Selenium2Config.php index b40cbb57..a6e6a4ab 100644 --- a/tests/Selenium2Config.php +++ b/tests/Selenium2Config.php @@ -33,12 +33,17 @@ public static function getInstance(): self public function createDriver(): DriverInterface { - $browser = getenv('WEB_FIXTURES_BROWSER') ?: 'firefox'; + $browser = $this->getBrowserName(); $seleniumHost = $_SERVER['DRIVER_URL']; return new Selenium2Driver($browser, null, $seleniumHost); } + public function getBrowserName(): string + { + return $_SERVER['WEB_FIXTURES_BROWSER'] ?? 'firefox'; + } + public function mapRemoteFilePath($file): string { if (!isset($_SERVER['TEST_MACHINE_BASE_PATH'])) { @@ -81,7 +86,7 @@ public function skipMessage($testCase, $test): ?string } if (array(JavascriptTest::class, 'testDragDropOntoHiddenItself') === $testCallback) { - $browser = $_SERVER['WEB_FIXTURES_BROWSER'] ?? null; + $browser = $this->getBrowserName(); if ($browser === 'firefox' && $this->getSeleniumMajorVersion() === 2) { return 'The Firefox browser compatible with Selenium 2.x does not fully implement drag-n-drop support.';