From 39e8e1e467cb2eac7fabfeaef864bbb05b903fa5 Mon Sep 17 00:00:00 2001 From: Alexis Lefebvre Date: Wed, 12 Jul 2023 20:03:18 +0200 Subject: [PATCH] Response Assertions: add examples of headers --- testing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing.rst b/testing.rst index 8a5a7b904c8..d3705a9984a 100644 --- a/testing.rst +++ b/testing.rst @@ -971,10 +971,10 @@ Response Assertions Asserts the response is a redirect response (optionally, you can check the target location and status code). ``assertResponseHasHeader(string $headerName, string $message = '')``/``assertResponseNotHasHeader(string $headerName, string $message = '')`` - Asserts the given header is (not) available on the response. + Asserts the given header is (not) available on the response, e.g. ``assertResponseHasHeader('content-type');``. ``assertResponseHeaderSame(string $headerName, string $expectedValue, string $message = '')``/``assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message = '')`` Asserts the given header does (not) contain the expected value on the - response. + response, e.g. ``assertResponseHeaderSame('content-type', 'application/octet-stream');``. ``assertResponseHasCookie(string $name, string $path = '/', string $domain = null, string $message = '')``/``assertResponseNotHasCookie(string $name, string $path = '/', string $domain = null, string $message = '')`` Asserts the given cookie is present in the response (optionally checking for a specific cookie path or domain).