Exemplo n.º 1
0
 public function testNotBlankValidation()
 {
     $notBlank = array('action', 'objectId', 'objectClass', 'valuesChanged');
     $this->validateNotBlanks($notBlank);
     $this->object->setAction('test');
     $this->object->setObjectId(1);
     $this->object->setObjectClass('test');
     $this->object->setValuesChanged('test');
     $this->validate(0);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function load(ObjectManager $manager)
 {
     $data = $this->container->get('ilioscli.dataloader.auditlog')->getAll();
     foreach ($data as $arr) {
         $entity = new AuditLog();
         $entity->setObjectId($arr['objectId']);
         $entity->setObjectClass($arr['objectClass']);
         $entity->setValuesChanged($arr['valuesChanged']);
         $entity->setCreatedAt($arr['createdAt']);
         $entity->setAction($arr['action']);
         $manager->persist($entity);
     }
     $manager->flush();
 }