ZF-8599: Session tests fail unless phpunit is run with --stderr
Description
Many Zend_Session unit tests fail with with error like:
Zend_Session_Exception: Session must be started before any output has been sent to the browser; output started in /usr/local/zend/share/pear/PHPUnit/Util/Printer.php/173
unless option --stderr is given to phpunit. It should somehow be fixed or there should be some clear instruction in the docs, or tests - somehow this should be cleaned up.
Comments
Posted by Aaron S. Hawley (ashawley) on 2010-10-22T08:05:43.000+0000
I experience this as well when running a single test case that depends on Zend_Auth, since it tries to use Zend_Session as a storage method. It is fixed by using --stderr, but I also don't have the problem if I run all the tests in the test suite (omitting the --stderr option) as defined in phpunit.xml. Instead, the tests will pass with flying colors, but the granularity should be available in the test suite.
Posted by Anton Visser (toneplex) on 2011-04-07T18:16:44.000+0000
I'm experiencing this with 1.11.3 and 1.11.4 now. Please could you fix this.
Posted by Aaron S. Hawley (ashawley) on 2011-04-08T02:38:40.000+0000
This is documented to some degree at:
http://framework.zend.com/manual/en/…
Though it should probably mention
This issue should be marked resolved.
Posted by Michael Moussa (mmoussa) on 2011-08-18T15:47:37.000+0000
Using
```
doesn't solve the issue for me. I have to run my tests with --stderr all the time. Definitely not resolved.
Posted by rasta (rasta) on 2012-06-07T09:02:30.000+0000
I have the same issue - I can't run unit tests with
because I don't get a session id in that case, which I really need. I have to run my tests with --stderr