Example #1
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $vm)
 {
     $vm = $this->container->get('vib.doctrine.registry')->getManagerForClass('VIB\\FliesBundle\\Entity\\InjectionVial');
     $vm->disableAutoAcl();
     $user = $this->getReference('user');
     $vial_1 = new InjectionVial();
     $vial_1->setTargetStock($this->getReference('stock_4'));
     $vial_1->setConstructName('test');
     $vial_1->setEmbryoCount(100);
     $vm->persist($vial_1);
     $vm->flush();
     $vm->createACL($vial_1, $user);
     $vial_2 = new InjectionVial();
     $vial_2->setTargetStockVial($this->getReference('vial_1'));
     $vial_2->setConstructName('test');
     $vial_2->setEmbryoCount(100);
     $vm->persist($vial_2);
     $vm->flush();
     $vm->createACL($vial_2, $user);
     $vm->enableAutoAcl();
 }
Example #2
0
 public function crossParentNameProvider()
 {
     $stock = new Stock();
     $stock->setGenotype('test genotype');
     $stock->setName('test stock');
     $stockVial = new StockVial();
     $stockVial->setStock($stock);
     $injection = new InjectionVial();
     $injection->setTargetStock($stock);
     $injection->setConstructName('test');
     return array(array(new FakeCrossVial(), null, 'test'), array(new FakeCrossVial(), $stockVial, 'test parent'), array(new FakeCrossVial(), $injection, 'test parent'), array(new FakeCrossVial(), new CrossVial(), 'test'));
 }