Skip to content

Conversation

barclaymichael
Copy link
Contributor

When a value was passed to assertSesionMissing($key, $value),

  • If that value was null, we only checked whether there was any value with the key passed, if there was wasnt we passed, and if there was we failed the assertion (session was not missing such key, so makes sense it failed).
  • If we passed a key and a value, we checked for that key in session and if the value was the same as the one we passed the assertion was succesful (session was not missing such key/value combination and it passed, doesn't make sense).
  • Passing a closure had the same issue.

That part of the code for assertSessionMissing was the same in assertSessionHas which hinted something was strange.

Fixed the assertion and added more tests for the different cases.

@taylorotwell taylorotwell merged commit 81c640f into laravel:12.x Sep 22, 2025
65 checks passed
tegos pushed a commit to tegos/laravel-framework that referenced this pull request Sep 28, 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.

2 participants