summaryrefslogtreecommitdiff
path: root/sapi/fpm/tests/response.inc
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/fpm/tests/response.inc')
-rw-r--r--sapi/fpm/tests/response.inc28
1 files changed, 28 insertions, 0 deletions
diff --git a/sapi/fpm/tests/response.inc b/sapi/fpm/tests/response.inc
index 54f85bcfb6..7ee9cd4640 100644
--- a/sapi/fpm/tests/response.inc
+++ b/sapi/fpm/tests/response.inc
@@ -99,6 +99,34 @@ class Response
}
/**
+ * @param string $name
+ * @param string $value
+ * @return Response
+ */
+ public function expectHeader($name, $value)
+ {
+ $this->checkHeader($name, $value);
+
+ return $this;
+ }
+
+ /**
+ * @param string $errorMessage
+ * @return Response
+ */
+ public function expectError($errorMessage)
+ {
+ $errorData = $this->getErrorData();
+ if ($errorData !== $errorMessage) {
+ $this->error(
+ "The expected error message '$errorMessage' is not equal to returned error '$errorData'"
+ );
+ }
+
+ return $this;
+ }
+
+ /**
* @param string $contentType
* @return string|null
*/