-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage of $_SERVER vs $_ENV #44
Comments
Firstly, we shouldn't use Secondly, I'm sorry but I don't understand the solution - what do you want to replace? The linked PR doesn't make a lot of sense to me, since the browser will almost always by different. Additionally, it's not clear to me why the PHPUnit XML should use |
I also like
Replace
Because this is the only way to configure how test suite runs (e.g. what browser to use for testing, how to map paths inside Document Root and such stuff).
According to PHPUnit documentation using Example 1:
Example 2:
If I had used |
And we want example 2 to work, right? Then the phpunit xml should be using
|
Yes, but to make it work all usages of As I said above that would be a BC break for all other drivers using the same test suite. |
env variables are readable through webdriver-classic-driver/.github/workflows/ci.yml Lines 118 to 122 in 61b12d0
Note also that |
This works only, when you don't have corresponding ENV var defined in PHPUnit config file: webdriver-classic-driver/phpunit.xml.dist Line 23 in 61b12d0
This way if we define default env var values in PHPUnit config file they can't overridden via the environment given to PHPUnit runner itself. |
Current state:
<server ...
inphpunit.xml.dist
file to define default settings for test suite$_SERVER
in test suite to use the above-defined settingsProblem:
Inability to override the above settings during GitHub Actions builds because we can set environment variables (readable through
$_ENV
) and not server variables (readable through$_SERVER
).Solution
Do so
Find & Replace
in thephpunit.xml.dist
on GitHub Actions instead of providing environment variables likeDRIVER_URL
and such, that don't override whatphpunit.xml.dist
defines.The text was updated successfully, but these errors were encountered: