/** * {@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(); }
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; }
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); }