diff --git a/tests/TestHelpers/HttpRequestHelper.php b/tests/TestHelpers/HttpRequestHelper.php index 2348e7d6be..828314681c 100644 --- a/tests/TestHelpers/HttpRequestHelper.php +++ b/tests/TestHelpers/HttpRequestHelper.php @@ -144,6 +144,10 @@ class HttpRequestHelper { $debugRequests = false; } + if ($debugRequests) { + self::debugRequest($request, $user, $password); + } + // The exceptions that might happen here include: // ConnectException - in that case there is no response. Don't catch the exception. // RequestException - if there is something in the response then pass it back. @@ -160,10 +164,6 @@ class HttpRequestHelper { } } - if ($debugRequests) { - self::debugRequest($request, $user, $password); - } - return $response; }