Beispiel #1
0
 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();
 }
Beispiel #2
0
 /**
  * @covers Ilios\CoreBundle\Entity\Discipline::__construct
  */
 public function testConstructor()
 {
     $this->assertEmpty($this->object->getCourses());
     $this->assertEmpty($this->object->getProgramYears());
     $this->assertEmpty($this->object->getSessions());
 }