Skip to content

EspoCRM – Open Source CRM Application

Test request support post form

Yuriie0911b547d4d
diff --git a/tests/integration/Core/BaseTestCase.php b/tests/integration/Core/BaseTestCase.php
index c0cbd58c92..0408c79197 100644
--- a/tests/integration/Core/BaseTestCase.php
+++ b/tests/integration/Core/BaseTestCase.php
@@ -358,6 +358,14 @@ abstract class BaseTestCase extends TestCase
$request = $request->withBody(
(new StreamFactory)->createStream($body)
);
+
+ $contentType = $request->getHeaderLine('Content-Type');
+
+ if ($contentType === 'application/x-www-form-urlencoded') {
+ parse_str($body, $parsedBody);
+
+ $request = $request->withParsedBody($parsedBody);
+ }
}
return new RequestWrapper($request, '', $routeParams);