Beispiel #1
0
 public function testToString()
 {
     $expected = 'Low test';
     $entity = new TaskPriority('low');
     $entity->setLabel($expected);
     $this->assertEquals($expected, (string) $entity);
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function load(ObjectManager $manager)
 {
     foreach ($this->data as $priority) {
         if (!$this->isPriorityExist($manager, $priority['name'])) {
             $entity = new TaskPriority($priority['name']);
             $entity->setLabel($priority['label']);
             $entity->setOrder($priority['order']);
             $manager->persist($entity);
         }
     }
     $manager->flush();
 }