Example #1
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $om)
 {
     $om = $this->container->get('vib.doctrine.registry')->getManagerForClass('VIB\\FliesBundle\\Entity\\Incubator');
     $om->disableAutoAcl();
     $user = $this->getReference('user');
     $incubator = new Incubator();
     $incubator->setName("Test incubator");
     $om->persist($incubator);
     $om->flush();
     $om->createACL($incubator, $user);
     $om->enableAutoAcl();
 }
Example #2
0
 public function testStorageUnit()
 {
     $rack = new Rack();
     $incubator = new Incubator();
     $incubator->setTemperature(28);
     $this->assertNull($rack->getStorageUnit());
     $rack->setStorageUnit($incubator);
     $this->assertEquals($incubator, $rack->getStorageUnit());
     return $rack;
 }
Example #3
0
 protected function getPosition()
 {
     $incubator = new Incubator();
     $incubator->setName('Test');
     $incubator->setTemperature(28);
     $rack = new Rack(1, 1);
     $rack->setStorageUnit($incubator);
     return new RackPosition($rack, 1, 1);
 }