Hello,
New to browsers, sessions, etc... I writing tests in simpletest to test our website. For many of the tests to work, the test first has to login into the site. When the login occurs, our web software creates a name for the session with session_name and then does a session_start.
If I get the content of the page before login, it's correct, if I login the page returned is correct. The login test is a separate method in the WebTestCase that I extend. The login method is passed a browser object ref to use to login. (e.g. $browser = & new SimpleBrowser; this->mylogin($browser)).
So each test calls the login method. In the login method, the correct page is returned after the login.
In the test code, after the return from the login method, any get to the site returns the page asking you to login?! What is going on here? e.g. after return from login a call like:
$page = $browser->getContent(); Gets the wrong page?
e.g.
test
login
get a page, looks good! logged in.
<back in test code>
get a page: opps, wrong page, asking you to login!?
endtest
Thanks for any help or pointers.






Bookmarks