Sometimes I will instantiate the ProjectConfiguration like the functional tests do so that I can initialize everything and test my models and other things that aren't functional/browser tests but require that symfony is fully loaded.
- Jon On Mon, Feb 9, 2009 at 4:03 AM, klemens_u <klem...@ull.at> wrote: > > Hi Stephen, > > you might want to look at this page: > http://trac.symfony-project.org/wiki/PluginTesting > > And furthermore this thread: > > http://groups.google.com/group/symfony-devs/browse_thread/thread/5c38ea3cc619c6fd?hl=en > > Hope it helps! > > :-) Klemens > > > > On 9 Feb., 06:32, isleshocky77 <sost...@sowebdesigns.com> wrote: > > I'm trying to add some unit tests for my plugin which relies upon > > Doctrine. I'm wondering if anyone has a best practice? Currently for > > unit testing my projects with Doctrine I include the following in all > > my unit tests. > > > > <?php > > # /test/bootstrap/Doctrine.php > > include(dirname(__FILE__).'/unit.php'); > > $configuration = ProjectConfiguration::getApplicationConfiguration > > ('public', 'test', true); > > new sfDatabaseManager($configuration); > > $con = Doctrine_Manager::getInstance()->getCurrentConnection(); > > Doctrine::loadData(sfConfig::get('sf_test_dir').'/fixtures', false); > > > > When trying to do this for plugins I get an error that it doesn't have > > the DoctrineManager loaded. I'm using sfTaskExtraPlugin to create the > > plugin and I've updated the /plugins/myPlugin/fixtures/project/config/ > > ProjectConfiguration.class.php to enable sfDoctrinePlugin > > > > Thanks in advance for any help. > > > > -- > > Stephen Ostrow <sost...@sowebdesigns.com> > > > -- Jonathan H. Wage Open Source Software Developer & Evangelist http://www.jwage.com http://www.doctrine-project.org http://www.symfony-project.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---