/** * @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()); }
public function testGetSetPassword() { $this->user->setPassword('[123456]'); $this->assertEquals('[123456]', $this->user->getPassword()); }