logo       

Re: Zend_Test & Zend_Layout: msg#00107

php.zend.framework.mvc

Subject: Re: Zend_Test & Zend_Layout

-- mikaelkael <perraud.mickael-1tsiiZ//OF9QFI55V6+gNQ@xxxxxxxxxxxxxxxx> wrote
(on Saturday, 19 July 2008, 11:45 AM +0200):
> Matthew Weier O'Phinney a écrit :
> > -- mikaelkael <perraud.mickael-1tsiiZ//OF9QFI55V6+gNQ@xxxxxxxxxxxxxxxx>
> > wrote
> > (on Friday, 18 July 2008, 02:37 AM -0700):
> >
> > > I use Zend_Layout with startMvc in my bootstrap. If I want to test my
> > > complete page, I need to reset the Zend_Layout's $_mvcIntance at each
> > > test.
> > >
> > > I extend Zend_Layout to create a resetMvcInstance function and call it in
> > > my
> > > setUp of each Zend_Test_PHPUnit_ControllerTestCase.
> > >
> > > Do I do that badly?
> > >
> >
> > No, actually. That very item is marked as a @todo in the
> > ControllerTestCase. :) (Adding a resetMvcInstance method to Zend_Layout,
> > that is.)
> >
> > I'm going to try to hit that before RC1, but it may be RC2 before I can
> > get to it.
> >
> > In practice, I haven't noticed that this functionality is completely
> > necessary, but I'm sure it's going to come up sooner or later for
> > somebody, which is why I identified it and marked it.
> >
> That functions with rev 10199.

Yep, forgot to post to the list: Zend_Layout now has a static
'resetMvcInstance()' method that 1) unregisters the Layout front
controller plugin, 2) unregisters the Layout action helper, and 3)
unsets the singleton MVC instance of Zend_Layout.

--
Matthew Weier O'Phinney
Software Architect | matthew-C1q0ot2/XZ0@xxxxxxxxxxxxxxxx
Zend Framework | http://framework.zend.com/



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise