public function testForceDelete()
 {
     $t = new Table4();
     $t->save();
     $t->forceDelete();
     $this->assertTrue($t->isDeleted(), 'forceDelete() actually deletes a row');
     Table4Peer::disableSoftDelete();
     $this->assertEquals(0, Table4Peer::doCount(new Criteria()), 'forced deleted rows are not present in the database');
 }
Exemplo n.º 2
0
 public function testForceDeleteDoesNotReEnableSoftDeleteIfDisabled()
 {
     Table4Peer::disableSoftDelete();
     $t = new Table4();
     $t->save();
     $t->forceDelete();
     $this->assertFalse(Table4Peer::isSoftDeleteEnabled(), 'forceDelete() does not reenable soft delete if previously disabled');
 }