You are here

public function ProtectedNodePerTypePassword::testHash in Protected Node 7

Same name and namespace in other branches
  1. 1.0.x tests/protected_node.per_type.test \ProtectedNodePerTypePassword::testHash()

Test that the password is well hashed when stored.

File

tests/protected_node.per_type.test, line 58
Test protected node per type functionality.

Class

ProtectedNodePerTypePassword
Configure protected_node to use per type password.

Code

public function testHash() {
  $hashed_page_content_type_password = hash('sha256', $this->page_content_type_password);
  $stored_page_content_type_password = variable_get('protected_node_node_type_password_page');
  $this
    ->assertEqual($stored_page_content_type_password, $hashed_page_content_type_password, "The page content type's password is stored hashed and the value correspond to the password.", $this->group);
}