Posted by grendzy on May 8, 2009 at 9:05pm
4 followers
Jump to:
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | simpletest.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
The Lastcraft Simpletest used in 1.0 had these functions for cookie handling:
assertCookie($name, $value)- Pass if there is currently a matching cookie
assertNoCookie($name)- Pass if there is currently no cookie of this name
getCookie($name)- Gets the cookie value for the current context
ageCookies($interval)- Ages current cookies prior to a restart
setCookie($name, $value)- Set a cookie from now on
Can they be brought back? Also a deleteCookie() would be nice.
Comments
#1
Yeah...these seem quite handy. Were they taken out to cut down on the amount of code?
#2
I have been reading the cURL documentation and I'm not seeing functions for cookie handling.
I think we could set CURLOPT_COOKIEJAR, and then maybe munge that file with http_parse_cookie(), but it requires pecl_http.
#3
+1
Related: http://groups.drupal.org/node/22176
#1319736: SimpleTest: Cookie is not set when calling drupalGet()
#4
#5
I think most tests are going to be just setting a cookie and examining the page output, which should be sufficient for a good start, complete cookie-jar support could wait a little bit