Beispiel #1
0
 /**
  * @expectedException LogicException
  */
 public function testActivaction_AlreadyActive_ThrowsException()
 {
     $email = new Email($this->getMock(self::USER_CLASS));
     $email->validateActivationToken('foo');
 }
Beispiel #2
0
 /**
  * Adds a new email to the user.
  *
  * @param Email $email The email to add.
  */
 public function addEmail(Email $email)
 {
     if (!$this->hasDefaultEmail()) {
         $email->setIsDefault(true);
     }
     $email->setUser($this);
     $this->emails->add($email);
 }