You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently cookies are set in CookieJar, which uses setcookie() directly to set cookies rather than adding them to the HTTPResponse object, which means we aren't fully including them in mock requests.
A good enhancement would be to make sure the HTTPResponse object is aware of cookies, either by setting the cookies via HTTPResponse::addHeader() (assuming that's something that can be done), or perhaps through a new method like registerCookie() or similar that just sets some private cookies array on the response object that can then be checked in functional tests... or by some other mechanism.
The text was updated successfully, but these errors were encountered:
Currently cookies are set in
CookieJar
, which usessetcookie()
directly to set cookies rather than adding them to theHTTPResponse
object, which means we aren't fully including them in mock requests.The cookie values are being set in mock requests by pulling them out of the cookie jar and setting the
$_COOKIE
env variable. So we are mocking cookie values but not the other attributes in cookie headers.A good enhancement would be to make sure the
HTTPResponse
object is aware of cookies, either by setting the cookies viaHTTPResponse::addHeader()
(assuming that's something that can be done), or perhaps through a new method likeregisterCookie()
or similar that just sets some private cookies array on the response object that can then be checked in functional tests... or by some other mechanism.The text was updated successfully, but these errors were encountered: