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.';