Exemplo n.º 1
0
 /**
  * @param User   $user
  * @param Status $status
  * @param bool   $updateCurrentStatus
  */
 protected function onSuccess(User $user, Status $status, $updateCurrentStatus)
 {
     $status->setUser($user);
     $this->em->persist($status);
     if ($updateCurrentStatus) {
         $user->setCurrentStatus($status);
         $this->um->updateUser($user);
         $this->um->reloadUser($user);
     }
     $this->em->flush();
 }
Exemplo n.º 2
0
 public function testUser()
 {
     $this->assertNull($this->status->getUser());
     $this->status->setUser($this->user);
     $this->assertEquals($this->user, $this->status->getUser());
 }