public function load(ObjectManager $manager) { $data = $this->container->get('ilioscore.dataloader.discipline')->getAll(); foreach ($data as $arr) { $entity = new Discipline(); $entity->setId($arr['id']); $manager->persist($entity); $this->addReference('disciplines' . $arr['id'], $entity); } $manager->flush(); }
/** * @covers Ilios\CoreBundle\Entity\Discipline::__construct */ public function testConstructor() { $this->assertEmpty($this->object->getCourses()); $this->assertEmpty($this->object->getProgramYears()); $this->assertEmpty($this->object->getSessions()); }