From 0c2864d220d2a4533be10aff0c6b7155f24e24a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Buchl=C3=A1k?= <30214087+fbuchlak@users.noreply.github.com> Date: Sun, 10 Nov 2024 01:00:35 +0100 Subject: [PATCH] fix assertion message for assertHeaderContains (#159) --- src/Browser/KernelBrowser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Browser/KernelBrowser.php b/src/Browser/KernelBrowser.php index 52bb607..8d11565 100644 --- a/src/Browser/KernelBrowser.php +++ b/src/Browser/KernelBrowser.php @@ -469,7 +469,9 @@ final public function assertHeaderContains(string $header, string $expected): se { Assert::that($this->client()->getResponse()->headers->get($header)) ->isNotNull('Header "{header}" is not present in the response.', ['header' => $header]) - ->contains($expected, 'Header "{header}" is "{actual}", but "{expected}" expected.', ['header' => $header]) + ->contains($expected, 'Header "{header}" value "{haystack}" is expected to contain "{needle}".', [ + 'header' => $header, + ]) ; return $this;