public function testNotBlankValidation() { $notBlank = array('title'); $this->validateNotBlanks($notBlank); $this->object->setTitle('up to sixty char'); $this->validate(0); }
public function load(ObjectManager $manager) { $data = $this->container->get('ilioscore.dataloader.cohort')->getAll(); foreach ($data as $arr) { $entity = new Cohort(); $entity->setId($arr['id']); $entity->setTitle($arr['title']); $entity->setProgramYear($this->getReference('programYears' . $arr['programYear'])); $manager->persist($entity); $this->addReference('cohorts' . $arr['id'], $entity); } $manager->flush(); }