It depends on your setup. You don't have to create stub resources unless you want to mock the behavior of the resource.
-- *Hector Virgen* Sr. Web Developer Walt Disney Parks and Resorts Online http://www.virgentech.com On Fri, Sep 10, 2010 at 3:07 PM, Andrey Korolyov <[email protected]>wrote: > It for test controllers. For example: > I want use Doctrine in my tests or create specific view renderer. In > this case I want to init application and run all test in with fully > initialized Application. > But as I understand your response I need to create mock objects for my > resources and init it for each test, isn't it? > > 2010/9/11 Hector Virgen <[email protected]>: > > BTW if you need to stub in a mock resource in your bootstrap, you can do > > this: http://pastie.org/1151031 > > -- > > Hector Virgen > > Sr. Web Developer > > Walt Disney Parks and Resorts Online > > http://www.virgentech.com > > > > > > On Fri, Sep 10, 2010 at 2:46 PM, Hector Virgen <[email protected]> > wrote: > >> > >> Zend_Test (an extension of PHPUnit included in ZF) can be used to unit > >> test your controllers. Also take a look at Matthew's blog post: > >> > >> > http://weierophinney.net/matthew/archives/182-Testing-Zend-Framework-MVC-Applications.html > >> > >> -- > >> Hector Virgen > >> Sr. Web Developer > >> Walt Disney Parks and Resorts Online > >> http://www.virgentech.com > >> > >> > >> On Fri, Sep 10, 2010 at 2:37 PM, Andrey Korolyov <[email protected]> > >> wrote: > >>> > >>> How to run unit test from framework environment? > >>> At this moment I see only one way. this is initialize Application and > >>> preset all resource plugins at setUp for each test. In Zend_Tests i > >>> found only tests for DBModels and Controller_Action. What about > >>> Zend_Application environment? > >>> > >>> -- > >>> Andrey Korolyov | WEB Developer > >>> > >>> e | [email protected] > >>> skype | andrey.korolyov > >> > > > > > > > > -- > Andrey Korolyov | WEB Developer > > e | [email protected] > skype | andrey.korolyov >
