예제 #1
0
 /**
  * Test fast-track deletion, i.e. bypassing FUSE.
  * For link beans.
  *
  * @return void
  */
 public function testFastTrackDeletion()
 {
     testpack('Test fast-track deletion');
     $ghost = R::dispense('ghost');
     $house = R::dispense('house');
     $house->sharedGhost[] = $ghost;
     \Model_Ghost_House::$deleted = FALSE;
     R::getRedBean()->getAssociationManager()->unassociate($house, $ghost);
     // No fast-track, assoc bean got trashed
     asrt(\Model_Ghost_House::$deleted, TRUE);
     \Model_Ghost_House::$deleted = FALSE;
     R::getRedBean()->getAssociationManager()->unassociate($house, $ghost, TRUE);
     // Fast-track, assoc bean got deleted right away
     asrt(\Model_Ghost_House::$deleted, FALSE);
 }
예제 #2
0
 public function delete()
 {
     self::$deleted = TRUE;
 }