-
-
Notifications
You must be signed in to change notification settings - Fork 236
Web server options for environment variables #330
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
Conversation
Use Process's array syntax to remove hackish code
made a few changes to make thing clear.
Update README.md
there is no stable version now. Default composer errors with [InvalidArgumentException] Could not find a version of package dunglas/panthere matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
[CS] Removed property used only in constructor
Delete `$baseUri` on test teardown
update composer command
Run PHP CS Fixer in the CI. Add Travis badge.
* Allowing customization of host and port for ChromeManager * Update ChromeManager.php * Update ChromeManager.php * Update ChromeManager.php * Style fixes * Removing ?
* Fix wrong statement in README * fix README - can be used instead of could be used
[Wording] - Readme
Prevent installing Browser Kit 4.1.0
Fixed command-line that was not retrieving all arguments properly
* Selenium manager * Selenium manager create method * fix cs * simple test * fix selenium manager test * fix travis ci test, fix cs * fix cs * fix cs, refactor constructor * fix constructor * fix test
Allow customization of host & port for the web server at creation
Explicitly add document root to PHP's web server command line
Add logo
This PR was merged into the 1.0.x-dev branch. Discussion ---------- Fix composer name Commits ------- 327bee1 fixed composer name
* Add timeouts to SeleniumManager * Create php.yml * Update php.yml * Update php.yml * Remove accidentally committed file.
Upgrade ChromeDriver to version 80.0.3987.106
* allow pass custom env parameter to webserver * add pass panther app env test * update changelog * fix coding styles * fix inherit env vars for symfony 3.4 * fix deprecation warning for inherit env vars in symfony 4.4 * remove changelog * Prevent env vars leaking Co-authored-by: Kévin Dunglas <dunglas@gmail.com>
Add PHP 7.4 to the Travis matrix
Prevent access to fixture files even if the web server is misconfigured
* Native Firefox support (through geckodriver) * Fix CS * Remove VCS repo * Cleanup * Fix lint * Use cast instead of the null coalescing operator
Replace mentions of Goutte by HttpBrowser in the readme
Changelog for 0.7.0
Fix an issue when one uses only the PantherTestCaseTrait
Fixed typo
Option environmentVariables
|
Helps me to execute different test_cases via custom kernel, would like to see this in next release @dunglas 👍 |
|
I don't understand where |
|
I for myself have different test cases, with which I map different test scenarios, e.g. to mock different external API's, load different configs.
Then i can load the kernel with the specific environment:
|
|
I am not sure how this works. Here is my code: // in my panther test
$this->client = static::createPantherClient([
'environmentVariables' => [
"CUSTOM_PATHER_VAR" => "this is a test",
],
]);// in my index.php
echo $_SERVER["CUSTOM_PATHER_VAR"];
echo getenv("CUSTOM_PATHER_VAR");// in my Kernel.php
echo $_SERVER["CUSTOM_PATHER_VAR"];
echo getenv("CUSTOM_PATHER_VAR");I am not seeing my custom var ( @ThomasTr suggests it should be available in Or was this never merged @dunglas? EDIT: answers to my questions starting here: #202 (comment) |
Goal:
Making some improvements to be able to use Panther as standalone (without Symfony and without PHPUnit).
Feature:
I would like to send custom environment variables to the created web server like: