@martinbean Thank you! Your code works, all I had to do is use assertPlainCookie() instead of trying to fetch the cookie value using the Cookie facade with Cookie::get().
If I add the cookie to the request using the withCookie() method, Cookie::get() CAN access the cookie.
@martinbean In reference to my previous reply, while assertPlainCookie() does confirm the cookie is set, there is not way to access it and do the actual testing, for functionality that is dependent upon the cookie value!
@liama I think you need to work out what you’re testing: are you testing the middleware adds the cookie, or are you testing that some code does something based on the presence and value of the cookie.