This test will fail: $value is 'bar' but $jsonValue is []
Looks like this is because json() doesn't call $this->prepareCookiesForRequest() like the non-JSON methods (get(), post(), etc.). I'm happy to add this in a PR, unless there's a reason not to add this?
Description:
Using
withCookies()
in a test when making a JSON request (getJson()
,postJson()
, etc.) does not send the cookies to the application.Steps To Reproduce:
Add this route:
Add this test:
This test will fail:
$value
is'bar'
but$jsonValue
is[]
Looks like this is because
json()
doesn't call$this->prepareCookiesForRequest()
like the non-JSON methods (get()
,post()
, etc.). I'm happy to add this in a PR, unless there's a reason not to add this?