aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7/fix-tests-devserver.patch
blob: 3f8220c5a124f2bc6e62b9139aa4bebe56d35dc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Mon, 01 May 2017 01:33:00 +0200
Subject: [PATCH] Fix tests failing due to extra message from built-in web server

Remove messages like:

    PHP 7.1.4 Development Server started at Mon May  1 00:42:39 2017

from test outputs, because tests do not expect them. I have no clue what
happens here...

--- a/run-tests.php
+++ b/run-tests.php
@@ -1918,6 +1918,9 @@
 	// Does the output match what is expected?
 	$output = preg_replace("/\r\n/", "\n", trim($out));
 
+	// Remove message from built-in development server.
+	$output = preg_replace("/^PHP [0-9.]+ Development Server started at .*\n\n?/m", "", $output);
+
 	/* when using CGI, strip the headers from the output */
 	$headers = "";