-- Giorgio Sironi <[EMAIL PROTECTED]> wrote (on Friday, 12 September 2008, 12:21 PM +0200): > 2008/9/11 Bruno Friedmann <[EMAIL PROTECTED]>: > > I've a application bootstrap which relies on Zend_Session. And I want to > > test controllers with the new (not so) > > Zend_Test_PHPUnit_ControllerTestCase. > > The problem is that Zend_Session is static:
We are well aware of Zend_Session's shortcomings, and have plans to rewrite it for 2.0. It's basically impossible to test in its current state, and over-engineered. (No, I did _not_ write it.) I had to place some really ugly hacks in it to get it to work for testing with Zend_Test. > I also have opened a topic in the fw-mvc list blaming the presence of > so many static classes in the framework components. Obviously you can > reset some of them, like Zend_Test_* does with the front controller > and the helper broker, but to me it feels like a workaround; This is something we also hope to address in 2.0. However, there are definitely some good reasons to have the front controller a singleton, and I haven't heard any truly compelling arguments for it not to be. Same goes for the helper broker. If you or others can suggest a design that meets the requirements of these components, I'm all ears, and welcome your input -- but just saying it's hackish and/or stinks doesn't really further the dialog. > also it means Zend_Session and other classes has to be aware of > testing, while a class should have only one resposibility. See above. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
