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