From 541ec1f7b47c298adbf722bde903ca61fb3d8c08 Mon Sep 17 00:00:00 2001 From: dangerdan Date: Thu, 1 Oct 2015 23:18:12 +0100 Subject: [PATCH] Update IntegrationTestCase.php Added ability to post body to test integration in order to test webhooks, json objects etc. --- src/TestSuite/IntegrationTestCase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TestSuite/IntegrationTestCase.php b/src/TestSuite/IntegrationTestCase.php index 615aefcd447..f9715da63a1 100644 --- a/src/TestSuite/IntegrationTestCase.php +++ b/src/TestSuite/IntegrationTestCase.php @@ -352,6 +352,9 @@ protected function _buildRequest($url, $method, $data) 'session' => $session, 'query' => $query ]; + if (!is_array($data)) { + $props['input'] = $data; + } $env = []; if (isset($this->_request['headers'])) { foreach ($this->_request['headers'] as $k => $v) {