Hi Matthias, > I'm already using the sfTaskExtraPlugin. The problem I actually had > was thet the bootstrap scripts were not working out of the box for me > as they don't have access to the symfony libs by default..
Yeah, that's one thing I forgot to mention. You need to export the path variable SYMFONY when running the tests with the bootstrap files. You can either do this temporarily for a test execution by calling $ SYMFONY=/path/to/sf/libs php plugins/myPlugin/test/unit/myClassTest.php or for a whole console session, by calling $ export SYMFONY=/path/to/sf/libs first. You could, of course, hardcode the sf library path in the plugin tests, but then the plugin isn't portable anymore and probably won't work in other environments/projects without modifications. > Is there a trick to enable cookies for testing? Hm, basically it's the same as for functional tests in normal applications. You should make sure that the following lines are written in the factories.yml of the tested application (probably the fixture project in the plugin) test: storage: class: sfSessionTestStorage param: session_path: %SF_TEST_CACHE_DIR%/sessions But this is the default content ... Maybe you could try adding the line session_name: symfony to the "param" key, but I doubt this will change anything. If you want to see some working unit tests in a plugin, you can look at the tests of sfGridPlugin for reference. http://trac.symfony-project.org/browser/plugins/sfGridPlugin/trunk/test/unit Unfortunately there are no functional tests yet though. Bernhard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---