Ejemplo n.º 1
0
 /**
  * @param VisitorInterface $visitor
  * @param array $data
  * @param array $type
  * @return ArrayCollection
  */
 public function deserialize(VisitorInterface $visitor, $data, array $type)
 {
     if (!$data) {
         return new ArrayCollection();
     }
     $tasks = [];
     foreach ($data as $uuid) {
         $tasks[] = $this->taskManager->getReference($uuid);
     }
     return new ArrayCollection($tasks);
 }
Ejemplo n.º 2
0
 public function testFilterReferences()
 {
     $task = new Task();
     $task->setDescription('foo');
     $this->taskManager->save($task);
     $this->taskManager->clear();
     $task = $this->taskManager->getReference($task->getUuid());
     $this->taskManager->filter();
     $this->assertEquals('foo', $task->getDescription());
 }