Welcome Guest, Not a member yet? Register   Sign In
Sessions and simpletest
#11

[eluser]Chad Fulton[/eluser]
My suspicion is that SimpleTest echoes the results of each of it tests <b>as it runs them</b>, which would mean that unless the test setting the session variable is the very first one, output will already have been sent, and therefore the session could not be set.

You could try using ob_start() before running the tests, and then ob_flush() afterwards.
#12

[eluser]InsiteFX[/eluser]
Hi,

I had that same error message a couple of weeks ago, I fixed it by re-installing CI.

Enjoy
InsiteFX
#13

[eluser]mooooo[/eluser]
Hi guys,

I'm running into the same problem. Did anyone solve this?

I have tried two different ways:

1. In my test I go to the login page, enter the credentials and click on the submit button. Everything works perfect until I try to see if I'm logged in or not, no session is set.

2. In my setUp function I've loaded my user_model and creates a login session. When I do this, I get the same error as above. Session can't be set.

Many thanks,
#14

[eluser]aroth[/eluser]
Hi, same problem here - apparently, even with no single test. Simpletest draws the little box on the top right corner before url_helper activates a Location... and that causes the issue (I guess). Found a similar issue solved for Drupal in http://sachachua.com/wp/2008/07/drupal-p...on-header/ but it doesnt't work for CI. Any other ideas anyone?
#15

[eluser]mooooo[/eluser]
Hi again,

__ REMOVED__

EDIT: Disregard this post.

Kind regards,
#16

[eluser]mooooo[/eluser]
I have spent a few more hours on this and I cannot find a solution to the problem. This must be a problem many of us come across since it happens as soon as a session is checked via SimpleTest WebTestCase.

Still no one with a solution?




Theme © iAndrew 2016 - Forum software by © MyBB