/** * @param string $password * @throws \pmill\Auth\Exceptions\HashException */ public function setPassword($password) { $passwordHelper = new \pmill\Auth\Password(); $this->password = $passwordHelper->hash($password); }
public function testVerifyIncorrect() { $passwordHelper = new \pmill\Auth\Password(); $verifyPasswordResult = $passwordHelper->verify($passwordHelper->hash('hunter2'), 'incorrect-password'); $this->assertFalse($verifyPasswordResult); }