Skip to content

Fix ignored test config variables, allow env vars to override them - #415

Open
aik099 wants to merge 1 commit into
minkphp:masterfrom
aik099:browser-name-from-server-var
Open

aik099 wants to merge 1 commit into
minkphp:masterfrom
aik099:browser-name-from-server-var

Conversation

@aik099

@aik099 aik099 commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Fixes:

  • the browser set via <server name="WEB_FIXTURES_BROWSER" .../> in a local phpunit.xml was ignored and Firefox was always started, while the skip checks used the configured browser (it was read via getenv() when creating the driver, but via $_SERVER in the skip checks)
  • the DRIVER_URL set by CI had no effect, because the <server name="DRIVER_URL" .../> in phpunit.xml.dist overwrote it (wasn't noticeable, because values were the same)
  • variables set in phpunit.xml (e.g. SELENIUM_VERSION) can now be overridden from the command line, e.g. SELENIUM_VERSION=2.53.1 vendor/bin/phpunit

Changes:

  • all test config variables are read via getEnvVar() from Let environment variables override PHPUnit "<server>" values driver-testsuite#118 (env var first, $_SERVER second), keeping PHP-side defaults
  • the TEST_MACHINE_BASE_PATH default is set via putenv() instead of writing to $_SERVER
  • <server> replaced with <env> in phpunit.xml.dist, and WEB_FIXTURES_BROWSER and DRIVER_URL uncommented, because <env> doesn't override an env var given on the command line or in CI

Related: minkphp/webdriver-classic-driver#44

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.42%. Comparing base (31eeac7) to head (45d55a6).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #415   +/-   ##
=========================================
  Coverage     89.42%   89.42%           
  Complexity      184      184           
=========================================
  Files             1        1           
  Lines           501      501           
=========================================
  Hits            448      448           
  Misses           53       53           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aik099

aik099 commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

This one is connected to the minkphp/webdriver-classic-driver#66 so making it Draft as well.

@aik099
aik099 marked this pull request as draft October 11, 2026 15:46
@aik099
aik099 force-pushed the browser-name-from-server-var branch from 18c94ae to cec0efb Compare November 14, 2026 20:37
@aik099
aik099 force-pushed the browser-name-from-server-var branch from cec0efb to f0c3cca Compare November 22, 2026 17:36
@aik099 aik099 changed the title Read "WEB_FIXTURES_BROWSER" from "$_SERVER" consistently Fix ignored test config variables, allow env vars to override them Nov 22, 2026
@aik099

aik099 commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

The failing "firefox, Selenium 3" job isn't caused by this PR: it's the OutsideViewportTest (added in minkphp/driver-testsuite#117), which fails on master too, because Firefox doesn't scroll an element into view before clicking/hovering it. It will be fixed by #389.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aik099

aik099 commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

With minkphp/driver-testsuite#118 merged this PR is:

  • using getEnvVar method provided;
  • ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant