From a7df46bf9ae21824054127378340ddf3fea8de16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Martin?= Date: Fri, 15 Nov 2024 18:12:30 +0100 Subject: [PATCH] ContextForText simply return url --- tests/units/testslib/ContextForTests.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/units/testslib/ContextForTests.php b/tests/units/testslib/ContextForTests.php index 2a807da4ed..c072c1b395 100644 --- a/tests/units/testslib/ContextForTests.php +++ b/tests/units/testslib/ContextForTests.php @@ -210,8 +210,12 @@ public function createJelixForm($formSel, $formId = null) { } - public function getUrl($selector) + public function getUrl($selector, $params = array()) { + // simple url build + $keyWithVal4QueryString = array(); + array_walk($params, function($v ,$key) use (&$keyWithVal4QueryString) {$keyWithVal4QueryString[]=$key.'='.$v;}); + return $selector.'?'.implode("&", $keyWithVal4QueryString); } public function getFullUrl($selector, $params = array())