Exemple #1
0
 public function testNotBlankValidation()
 {
     $notBlank = array('name');
     $this->validateNotBlanks($notBlank);
     $this->object->setName('test up to 192 in length search string');
     $this->validate(0);
 }
Exemple #2
0
 public function load(ObjectManager $manager)
 {
     $data = $this->container->get('ilioscore.dataloader.meshTerm')->getAll();
     foreach ($data as $arr) {
         $entity = new MeshTerm();
         $entity->setId($arr['id']);
         $entity->setMeshTermUid($arr['meshTermUid']);
         $entity->setName($arr['name']);
         $entity->setLexicalTag($arr['lexicalTag']);
         $entity->setConceptPreferred($arr['conceptPreferred']);
         $entity->setRecordPreferred($arr['recordPreferred']);
         $entity->setPermuted($arr['permuted']);
         $entity->setPrintable($arr['printable']);
         foreach ($arr['concepts'] as $id) {
             $entity->addConcept($this->getReference('meshConcepts' . $id));
         }
         $this->addReference('meshTerms' . $arr['id'], $entity);
         $manager->persist($entity);
     }
     $manager->flush();
 }