Closed grasmanek94 closed 3 years ago
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
@driesvints the file
https://github.com/laravel/framework/blob/v8.49.2/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
belongs to the laravel/framework repository.
The functions in this class prepare and perform the requests, as far as I'm aware. It hides away any access to low level HTTP stuff, which means I cannot, without reflection/breaking encapsulation, fix this in my tests (and guarantee the code will work in the future).
How is this not a bug? (result differs from expected behaviour).
Description:
Using sanctum middleware. Laravel test requests seem to remember some kind of additional authentication, on top of the provided token. There's nothing to clear the cookies. Flushing the headers does not work either. Resetting the value of the authorization header doesn't work either.
Steps To Reproduce:
Running test cases that logically authenticate a request, and then perform an unauthenticated request, reproduces this. Example:
Extra:
Same issue as https://github.com/laravel/framework/issues/30677
I don't understand how this is expected behaviour?
Can I know the rationale behind this if this is not a bug?