From f7926eb23fc210ef3f7ca4412662123400f5ce3d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 8 Jun 2022 19:57:16 +0200 Subject: [PATCH] tests: PHP<=7.3 compat --- tests/helper/dump.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/helper/dump.inc b/tests/helper/dump.inc index 5612d06..59d258c 100644 --- a/tests/helper/dump.inc +++ b/tests/helper/dump.inc @@ -18,7 +18,7 @@ function dump_message($stream, http\Message $msg, $parent = false) { fprintf($stream, "%s\n", $msg->getInfo()); dump_headers($stream, $msg->getHeaders()); $msg->getBody()->toStream($stream); - + if ($parent && ($msg = $msg->getParentMessage())) { dump_message($stream, $msg, true); } @@ -28,7 +28,9 @@ function dump_responses($client, array $expect_cookie = []) { while (($r = $client->getResponse())) { dump_headers(null, $r->getHeaders()); if ($expect_cookie) { - $got_cookies = array_merge(...array_map(fn($c) => $c->getCookies(), $r->getCookies())); + $got_cookies = array_merge(...array_map(function($c) { + return $c->getCookies(); + }, $r->getCookies())); if ($expect_cookie != $got_cookies) { var_dump($expect_cookie, $got_cookies); echo $r->toString(true); -- 2.30.2