예제 #1
0
 public function testNotBlankValidation()
 {
     $notBlank = array('name');
     $this->validateNotBlanks($notBlank);
     $this->object->setName('Smorgasbord');
     $this->validate(0);
 }
예제 #2
0
 public function load(ObjectManager $manager)
 {
     $data = $this->container->get('ilioscore.dataloader.assessmentOption')->getAll();
     foreach ($data as $arr) {
         $entity = new AssessmentOption();
         $entity->setId($arr['id']);
         $entity->setName($arr['name']);
         $manager->persist($entity);
         $this->addReference('assessmentOptions' . $arr['id'], $entity);
     }
     $manager->flush();
 }
예제 #3
0
 /**
  * @covers \Ilios\CoreBundle\Entity\AssessmentOption::__construct
  */
 public function testConstructor()
 {
     $this->assertEmpty($this->object->getSessionTypes());
 }