Example #1
0
 function Test_of_destroyAll()
 {
     $AkTestFields = new AkTestField();
     $AkTestFields->transactionStart();
     for ($i = 0; $i <= 10; $i++) {
         $AkTestFields->create(array('varchar_field' => 'field to destroyAll ' . $i));
     }
     $AkTestFields->transactionComplete();
     $AkTestFields->destroyAll("varchar_field  LIKE '%destroyAll%'");
     $this->assertEqual(count($AkTestFields->findAll()), 3);
     $AkTestFields->destroyAll('');
     $this->assertFalse($AkTestFields->findAll());
 }