Hi, within my Unit-tests i would like to have the following behavior:
$myNewDoctrineRecord = new Dto_MyRecord();
$myNewDoctrineRecord->pk = 1; //the primary key
...
$myNewDoctrineRecord->save();
Now this record shouldnt really persist to the database. But i would like to do
$myFetchedDoctrineRecord = Doctrine::getTable('Dto_MyRecord')->find(1);
//result should be $myFetchedDoctrineRecord === $myNewDoctrineRecord
I know this could be achived with a DAO pattern, where i replace the DAO to some mock. But maybe there is some possibility so just say Doctrine not to persist, but only to "remember" the records.
Thank you! Markus