From a8bf0bc4f269615302c4805548d472e5c4afa4a2 Mon Sep 17 00:00:00 2001 From: fbuchlak <30214087+fbuchlak@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:13:24 +0100 Subject: [PATCH] fix assertion message for assertHeaderContains --- 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 babbca4..4e77516 100644 --- a/src/Browser/KernelBrowser.php +++ b/src/Browser/KernelBrowser.php @@ -458,7 +458,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;