minkphp / driver-testsuite

Functional testsuite for Mink drivers
MIT License
8 stars 28 forks source link

Different env var names for test server host #92

Open uuf6429 opened 7 months ago

uuf6429 commented 7 months ago

Shouldn't these two points use the same environment variable (at least for the port)? https://github.com/minkphp/driver-testsuite/blob/2ef2bfff906b7c374b181e490c9b67ed3b299943/tests/AbstractConfig.php#L42 and https://github.com/minkphp/driver-testsuite/blob/2ef2bfff906b7c374b181e490c9b67ed3b299943/bin/mink-test-server#L9

In https://github.com/minkphp/webdriver-classic-driver/pull/23, I was considering to use the mink-test-server script instead of calling PHP directly in the bootstrap.php file, but from what I understand it wouldn't work, unless I force MINK_HOST with:

$parsedUrl = parse_url(WebdriverClassicConfig::getInstance()->getWebFixturesUrl());
$process = new Process(..., ['MINK_HOST' => $parsedUrl['host'] . ':' . $parsedUrl['port']])`

@aik099 that's another reason I wasn't relying on the old/current (broken) approach.

aik099 commented 7 months ago

I guess different environment variables were used because nobody called the mink-test-server bash script from the PHPUnit bootstrap, where WEB_FIXTURES_HOST is also available.