From 94df6dc3fd07fa187ba09c587a8d1357fd8bbe6f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 23 Jun 2019 13:54:42 +0200 Subject: Split test case This test is failing on AppVeyor almost all of the time, so splitting it seems appropriate. This also allows us to rid php_cli_server_stop() which was only used by this test case. --- sapi/cli/tests/bug67429.phpt | 55 --------------------------------------- sapi/cli/tests/bug67429_1.phpt | 42 ++++++++++++++++++++++++++++++ sapi/cli/tests/bug67429_2.phpt | 42 ++++++++++++++++++++++++++++++ sapi/cli/tests/php_cli_server.inc | 17 ------------ 4 files changed, 84 insertions(+), 72 deletions(-) delete mode 100644 sapi/cli/tests/bug67429.phpt create mode 100644 sapi/cli/tests/bug67429_1.phpt create mode 100644 sapi/cli/tests/bug67429_2.phpt diff --git a/sapi/cli/tests/bug67429.phpt b/sapi/cli/tests/bug67429.phpt deleted file mode 100644 index a047de6e31..0000000000 --- a/sapi/cli/tests/bug67429.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -FR #67429 (CLI server is missing some new HTTP response codes) ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -HTTP/1.1 308 Permanent Redirect -Date: %s -Connection: close -X-Powered-By: %s -Content-type: text/html; charset=UTF-8 - -HTTP/1.1 426 Upgrade Required -Date: %s -Connection: close -X-Powered-By: %s -Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug67429_1.phpt b/sapi/cli/tests/bug67429_1.phpt new file mode 100644 index 0000000000..8f3d6c79bc --- /dev/null +++ b/sapi/cli/tests/bug67429_1.phpt @@ -0,0 +1,42 @@ +--TEST-- +FR #67429 (CLI server is missing some new HTTP response codes) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +HTTP/1.1 308 Permanent Redirect +Date: %s +Connection: close +X-Powered-By: %s +Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug67429_2.phpt b/sapi/cli/tests/bug67429_2.phpt new file mode 100644 index 0000000000..77447686a4 --- /dev/null +++ b/sapi/cli/tests/bug67429_2.phpt @@ -0,0 +1,42 @@ +--TEST-- +FR #67429 (CLI server is missing some new HTTP response codes) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +HTTP/1.1 426 Upgrade Required +Date: %s +Connection: close +X-Powered-By: %s +Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server.inc b/sapi/cli/tests/php_cli_server.inc index 1f7091be5c..6421978a37 100644 --- a/sapi/cli/tests/php_cli_server.inc +++ b/sapi/cli/tests/php_cli_server.inc @@ -109,21 +109,4 @@ php_cli_server_start_error: return $handle; } - -function php_cli_server_stop($handle) { - $success = FALSE; - if ($handle) { - proc_terminate($handle); - /* Wait for server to shutdown */ - for ($i = 0; $i < 60; $i++) { - $status = proc_get_status($handle); - if (!($status && $status['running'])) { - $success = TRUE; - break; - } - usleep(50000); - } - } - return $success; -} ?> -- cgit v1.2.1