Hi there,

See if the following helps:




// testing insert
function test1()
{
   $data = "" // stuff here );
   $this->assertTrue($this->user->save($data));
}
// testing fail to insert duplicate data
function test2()
{
   $data = "" // same stuff here );

$this->User->cacheQueries = false;
 


   $this->assertFalse($this->user->save($data));


$this->User->cacheQueries = true;
 

}


I'm not sure if it needs to be set back to true afterwards so I put it there just to be safe.

You could also probably put these in the setup() and teardown() methods but again I'm not certain how this will affect the rest of the app.

I asked these questions before but didn't get any responses. Perhaps someone can shed some light on the subject?
http://groups.google.com/group/cake-php/browse_thread/thread/f63c6883a8d301ff/211449bb08d706fe?lnk=gst&q=cacheQueries&rnum=1#211449bb08d706fe

HTH

Cheers,

Sonic


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to