function _password_policy_advance_test_clock in Password Policy 7
Advances test clock.
Increases the difference between the test clock and the system clock by a given offset of seconds.
Parameters
int $offset: Offset in seconds. Can be positive or negative.
9 calls to _password_policy_advance_test_clock()
- PasswordPolicyExpirationTestCase::testAdminExpirationDisabled in tests/
password_policy_expiration.test - Tests "Admin (UID=1) password expires" being disabled (i.e., unchecked).
- PasswordPolicyExpirationTestCase::testAdminExpirationEnabled in tests/
password_policy_expiration.test - Tests "Admin (UID=1) password expires" being enabled (i.e., checked).
- PasswordPolicyExpirationTestCase::testExpirationConstraint in tests/
password_policy_expiration.test - Tests expiration constraint.
- PasswordPolicyExpirationTestCase::testUnblockingExpiredAccountViaUserEditForm in tests/
password_policy_expiration.test - Tests unblocking an expired account via user edit form.
- PasswordPolicyExpirationTestCase::testUnblockingReblockedAccount in tests/
password_policy_expiration.test - Tests unblocking a "reblocked" account.
File
- ./
password_policy.time.inc, line 120 - Password Policy time retrieval functions.
Code
function _password_policy_advance_test_clock($offset) {
$current_offset = _password_policy_get_test_clock_offset();
$new_offset = $current_offset + $offset;
variable_set('password_policy_test_clock_offset', $new_offset);
}