Exemplo n.º 1
0
 public function testNotBlankValidation()
 {
     $notBlank = array('id', 'description');
     $this->validateNotBlanks($notBlank);
     $this->object->setId('strtest');
     $this->object->setDescription('my car is great');
     $this->validate(0);
 }
Exemplo n.º 2
0
 public function load(ObjectManager $manager)
 {
     $data = $this->container->get('ilioscore.dataloader.aamcMethod')->getAll();
     foreach ($data as $arr) {
         $entity = new AamcMethod();
         $entity->setId($arr['id']);
         $entity->setDescription($arr['description']);
         $manager->persist($entity);
         $this->addReference('aamcMethods' . $arr['id'], $entity);
     }
     $manager->flush();
 }