Since the password_inc variable determines which file is being included

require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');

and since the core's implementation's documentation states

An alternative or custom version of this password hashing API [...] containing replacement user_hash_password(), user_check_password(), and user_needs_new_hash() functions.

the testPasswordHashing function should not assume there's a constant DRUPAL_MIN_HASH_COUNT nor a function _password_get_count_log2.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sneakyvv’s picture

Status: Active » Needs review
FileSize
4.54 KB

I've attached a patch which makes the function testPasswordHashing check if the constant and function exist.