class ForcePasswordChangeServiceTest in Force Password Change 2.0.x
Same name in this branch
- 2.0.x tests/src/Unit/Service/ForcePasswordChangeServiceTest.php \Drupal\Tests\force_password_change\Unit\Service\ForcePasswordChangeServiceTest
- 2.0.x tests/modules/force_password_change_service_test/src/Service/ForcePasswordChangeServiceTest.php \Drupal\force_password_change_service_test\Service\ForcePasswordChangeServiceTest
Test class created to override the ForcePasswordChangeService service.
Hierarchy
- class \Drupal\force_password_change\Service\ForcePasswordChangeService implements ForcePasswordChangeServiceInterface
- class \Drupal\force_password_change_service_test\Service\ForcePasswordChangeServiceTest
Expanded class hierarchy of ForcePasswordChangeServiceTest
1 file declares its use of ForcePasswordChangeServiceTest
- ForcePasswordChangeServiceTest.php in tests/
src/ Unit/ Service/ ForcePasswordChangeServiceTest.php
File
- tests/
modules/ force_password_change_service_test/ src/ Service/ ForcePasswordChangeServiceTest.php, line 10
Namespace
Drupal\force_password_change_service_test\ServiceView source
class ForcePasswordChangeServiceTest extends ForcePasswordChangeService {
/**
* {@inheritdoc}
*/
protected function userLoadMultiple(array $uids) {
$return = [];
foreach ($uids as $uid) {
$return[$uid] = 'user' . $uid;
}
return $return;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ForcePasswordChangeService:: |
protected | property | The config factory object. | |
ForcePasswordChangeService:: |
protected | property | The current user. | |
ForcePasswordChangeService:: |
protected | property | The force password change data mapper. | |
ForcePasswordChangeService:: |
protected | property | The time service. | |
ForcePasswordChangeService:: |
protected | property | The config factory object. | |
ForcePasswordChangeService:: |
public | function |
Mark a user as having been forced to change their password on their first login. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Check to see if the current user has a pending forced password change. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Force a password change for a given user. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Force a password change for the given users. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Retrieve a list of users who have a pending forced password change on their first login. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Get the last time at which a role was forced to change passwords for all users. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Retrieve the user accounts of users in the role who do not have a pending
forced password change. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Retrieve the users with a pending forced password change in a given role. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
protected | function | Retrieve the timestamp for the current request. Spun out into a protected function to allow for overriding in Unit Tests. | |
ForcePasswordChangeService:: |
public | function |
Get the time periods after which each role will expire. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Converts a number of seconds to a human-friendly time period. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Get the number of users in the given role. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Retrieve the users in a given role. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Insert the time period after which passwords should expire, for the given roles. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Register the time at which a user has been forced to change
their password. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Remove the mark for a user who was forced to change their password on their first login. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Remove a pending force for a given user. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Set the last time a user's password was changed to the current timestamp. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Update the time period expiration data for a given role. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function |
Update the time at which all users in the given roles have been
forced to change their passwords. Overrides ForcePasswordChangeServiceInterface:: |
|
ForcePasswordChangeService:: |
public | function | Constructs a ForcePasswordChangeService object. | |
ForcePasswordChangeServiceTest:: |
protected | function |
Helper function to load mulitple user objects. Spun out into a
protected function to allow for overriding in Unit Tests. Overrides ForcePasswordChangeService:: |