I am doing unit testing in PHP for a site that requires authentication. Authentication is cookie based, so I need to add cookies to the cookie doll:
[ 'user_token' => '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae' ]
Then the web application can use this well-known good token for test data and will be able to authenticate in the test environment to interact with the data.
In addition, it must be a secure cookie, and I (obviously) must set the domain.
The problem is that I do not know how to make and set this cookie and paste it into the jar. How do you do this?
source
share