I'm doing my first unit tests, with a database fixture loaded from a
yml file by sfPropelData::loadData.

Is there a way of referring in the test to objects in the fixture by
their labels in the yml?

eg suppose in the yml I have

MyClass:
  myclass_1:
    name:  ...
etc.

Then if I want this record in my unit test file, of course I can load
it by MyClassPeer::doSelect with suitable criteria; but supposing this
class isn't what I'm testing in the particular test, is there a
function I can call to get the id of myclass_1, so that I can go

$id = some_function('myclass_1');
$myobject = MyClassPeer::retrieveByPk($id);

?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to