Ejemplo n.º 1
0
 /**
  * @param User $user
  * @param $password
  * @return bool
  */
 public function checkPassword(User $user, $password)
 {
     $bcrypt = new Bcrypt();
     $bcrypt->setCost(14);
     return $bcrypt->verify($password, $user->getPassword());
 }
Ejemplo n.º 2
0
 public function testGetSetPassword()
 {
     $this->user->setPassword('[123456]');
     $this->assertEquals('[123456]', $this->user->getPassword());
 }