|
From: Marcus B. <ma...@wo...> - 2008-09-08 13:10:12
|
Hi... Taras Diakiw wrote: > How do you delete a particular cookie? This is a thorny one, as the browsers don't necessarily do this either. SimpleTest acts like a fussy (Netscape) browser. You have to explicitly set a timeout. You cannot delete a cookie with SimpleTest as such, but you must use the same tricks a s the browser. If you look at the SimpleTest source in simpletest/test/cookies_test.php, right at the end you will see some tests that make sure this emulation is possible. If you look at WebTester::setCookie() in the actual source code, you'll see that you can set all the information you need. > The context of my question is that I'm implementing single sign on for a forum. Why not actually do the sign-up in the test? That is, start with the home page, sign-up, then do your task. It will be slower of course, but only for the one or two tests that depend on this behaviour? Otherwise your tests may be difficult to understand. Or am I missing something important? > Thanks > > Taras yours, Marcus |