Skip to content

Commit

Permalink
fix assertion message for assertHeaderContains (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuchlak authored Nov 10, 2024
1 parent 29d4fe6 commit 0c2864d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Browser/KernelBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c2864d

Please sign in to comment.