Skip to content

Conversation

@geisi
Copy link

@geisi geisi commented Sep 7, 2025

Hi PestPHP team,

thank you for the awesome Pest v4 release and the new browser testing plugin.

This PR introduces functionalities to do assertions on cookies when visiting pages.

This is especially useful when you want to test applications that have some custom cookie logic. E.g. testing cookie security mechanisms, impersonation or login functionalities.

New Assertions added in this PR

$page = visit('https://laravel.com');

$page->assertHasCookie('laravel');
$page->assertCookieMissing('django');
$page->assertNoCookies();

@geisi geisi changed the title add cookie assertions feat: add cookie assertions Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant