Skip to content

Commit 2138b33

Browse files
committed
Fix curl tests
The router script needs to be absolute, since tests are executed in the root of the project. This was not discovered because the router script wouldn't emit errors.
1 parent 85c4ac8 commit 2138b33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/curl/tests/server.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
function curl_cli_server_start() {
44
$php_executable = getenv('TEST_PHP_EXECUTABLE') ?: PHP_BINARY;
55
$doc_root = __DIR__;
6-
$router = "responder/get.inc";
6+
$router = __DIR__ . "/responder/get.inc";
77
$cmd = [$php_executable, '-t', $doc_root, '-n', '-S', 'localhost:0', $router];
88
$descriptorspec = array(
99
0 => STDIN,
@@ -71,7 +71,7 @@ function curl_cli_server_start() {
7171
}
7272

7373
register_shutdown_function(
74-
function($handle) use($router) {
74+
function($handle) {
7575
proc_terminate($handle);
7676
/* Wait for server to shutdown */
7777
for ($i = 0; $i < 60; $i++) {

0 commit comments

Comments
 (0)