public function ProtectedNodeGlobalPassword::testHash in Protected Node 1.0.x
Same name and namespace in other branches
- 7 tests/protected_node.global.test \ProtectedNodeGlobalPassword::testHash()
Test that the password is well hashed when stored.
File
- tests/
protected_node.global.test, line 46 - Test protected node global password functionality.
Class
- ProtectedNodeGlobalPassword
- Configure protected_node to use global password.
Code
public function testHash() {
$hashed_global_password = hash('sha256', $this->global_password);
$stored_global_password = variable_get('protected_node_global_password');
$this
->assertEqual($stored_global_password, $hashed_global_password, "The global password is stored hashed and the value correspond to the global password.", $this->group);
}