Remove environmental variable no longer needed

All the tests now make use of PHP's built-in web server and the variable
is no longer needed to determine if the development server is being
used.
This commit is contained in:
Zach Borboa
2021-03-26 00:03:46 -04:00
parent 2e63c0d00a
commit 0031da7477
2 changed files with 9 additions and 9 deletions
+9 -6
View File
@@ -68,12 +68,15 @@ class Test
public static function getTestUrl($port)
{
if (getenv('PHP_CURL_CLASS_LOCAL_TEST') === 'yes' ||
in_array(getenv('CI_PHP_VERSION'), ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', 'nightly'])) {
return 'http://127.0.0.1:' . $port . '/';
} else {
return self::TEST_URL;
}
// Return url pointing to a test server running on the specified port.
// To avoid installing and configuring a web server for the tests, PHP's
// built-in development server is used. As each development server can
// only handle one request at a time (single-threaded) and some tests
// expect the server to handle requests simultaneously, multiple
// instances are run on different ports. With this setup, requests in
// the test can be made to the various port urls without having to be
// handled sequentially.
return 'http://127.0.0.1:' . $port . '/';
}
}
-3
View File
@@ -6,9 +6,6 @@ set -x
# Let test server know we should allow testing.
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
# Let test server know this is a local test.
export PHP_CURL_CLASS_LOCAL_TEST="yes"
# Start test servers. Run servers on different ports to allow simultaneous
# requests without blocking.
server_count=7