Exemple #1
0
 /**
  * Test trashAll().
  */
 public function testMultiDeleteUpdate()
 {
     testpack('test multi delete and multi update');
     $beans = R::dispenseLabels('bean', array('a', 'b'));
     $ids = R::storeAll($beans);
     asrt((int) R::count('bean'), 2);
     R::trashAll(R::batch('bean', $ids));
     asrt((int) R::count('bean'), 0);
     testpack('test assocManager check');
     $rb = new OODB(R::getWriter());
     try {
         $rb->getAssociationManager();
         fail();
     } catch (RedException $e) {
         pass();
     }
 }
 /**
  * Constructor,
  * creates a new instance of DupManager.
  *
  * @param ToolBox $toolbox
  */
 public function __construct(ToolBox $toolbox)
 {
     $this->toolbox = $toolbox;
     $this->redbean = $toolbox->getRedBean();
     $this->associationManager = $this->redbean->getAssociationManager();
 }