Hi All,

I am trying to create unit-tests for my custom model methods but am having
some trouble with propel (the testing requirements are quite a lot when
using propel objects). This is the first tme I'm doing unti testing using
symfony so forgive me if my question might seem obvious to some.

I have created all the includes I can think of to allow this to work but I
still get the message when running the test on command line:

No connection params set for propel

I did find this ticket, http://trac.symfony-project.org/ticket/2702, on what
sounds like my problem but don't know whether that has found its way into my
version of symfony (symfony version 1.1.1 ). If this is not the cause could
someone help me out with what I may be missing? My rather simple test, which
I know is a mess but will be cleaning up as soon as I get it working, for
now is:

$configuration = new ProjectConfiguration;
$configuration->setup();
include(dirname(__FILE__).'/../bootstrap/unit.php');
set_include_path($configuration->getSymfonyLibDir().'/plugins/sfPropelPlugin/lib/vendor'.PATH_SEPARATOR.$configuration->getRootDir().PATH_SEPARATOR.get_include_path());
require_once($configuration->getSymfonyLibDir().'/autoload/sfSimpleAutoload.class.php');
$autoload = sfSimpleAutoload::getInstance();
$autoload->addDirectory(dirname(__FILE__).'/../../lib/model');
$autoload->register();
//sfCore::initSimpleAutoload(array(SF_ROOTDIR.'/lib/model',
$sf_symfony_lib_dir.'/vendor/propel'));

$test = new lime_test(1, new lime_output_color());

$test_ou = OrganisationalUnitsPeer::retrieveByPK(1);

$test->diag('Exists:');
$test->isa($test_ou, 'object', 'Is an object');

Thanks to anyone who can help.

Gareth

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to