New tests.

This commit is contained in:
James Cole
2016-12-18 17:54:11 +01:00
parent 8666197e05
commit 5a57398f81
15 changed files with 223 additions and 152 deletions

View File

@@ -148,4 +148,16 @@ class UserRepository implements UserRepositoryInterface
return $return;
}
/**
* @param User $user
* @param string $password
*
* @return mixed
*/
public function changePassword(User $user, string $password)
{
$user->password = bcrypt($password);
$user->save();
}
}

View File

@@ -41,6 +41,14 @@ interface UserRepositoryInterface
*/
public function attachRole(User $user, string $role): bool;
/**
* @param User $user
* @param string $password
*
* @return mixed
*/
public function changePassword(User $user, string $password);
/**
* Returns a count of all users.
*