password_policy_test.module in Password Policy 7
Support module for testing Password Policy.
Allows testing hooks as might be implemented by another module.
File
tests/password_policy_test/password_policy_test.moduleView source
<?php
/**
* @file
* Support module for testing Password Policy.
*
* Allows testing hooks as might be implemented by another module.
*/
/**
* Implements hook_help().
*
* Dummy implementation to satisfy PAReview.
*/
function password_policy_test_help($path, $arg) {
return '';
}
/**
* Implements hook_password_policy_force_change_allowed_paths_alter().
*/
function password_policy_test_password_policy_force_change_allowed_paths_alter(&$allowed_paths) {
if (_password_policy_test_is_testing_allowed_paths_alter()) {
$allowed_paths[] = 'node';
$allowed_paths[] = 'node/add/*';
}
}
/**
* Determines whether the allowed paths alter feature is currently under test.
*/
function _password_policy_test_is_testing_allowed_paths_alter() {
return variable_get('password_policy_test_force_change_allowed_paths_alter', FALSE);
}
Functions
Name | Description |
---|---|
password_policy_test_help | Implements hook_help(). |
password_policy_test_password_policy_force_change_allowed_paths_alter | Implements hook_password_policy_force_change_allowed_paths_alter(). |
_password_policy_test_is_testing_allowed_paths_alter | Determines whether the allowed paths alter feature is currently under test. |