/** * @return HHPnet\Core\Domain\Users\User */ public function generateNewPassword() { $this->password->generateNewPassword(); return $this; }
/** * @param \HHPnet\Core\Domain\Users\UserId $user_id * @param \HHPnet\Core\Domain\Users\UserPassword $user_password */ public function it_fails_when_invalid_password_is_provided(UserId $user_id, UserPassword $user_password) { $user_password->isValidPassword('invalid_password')->willReturn(false); $this->beConstructedWith($user_id, 'user', $user_password, 'email'); $this->isValidPassword('invalid_password')->shouldBe(false); }