public function ProtectedNodeBulkPassword::setUp in Protected Node 1.0.x
Same name and namespace in other branches
- 7 tests/protected_node.bulk.test \ProtectedNodeBulkPassword::setUp()
Prepare users for protected node's tests.
Overrides ProtectedNodeBaseTestCase::setUp
File
- tests/
protected_node.bulk.test, line 27 - Test protected node bulk actions functionality.
Class
- ProtectedNodeBulkPassword
- Configure protected_node to use mixin password.
Code
public function setUp() {
parent::setUp();
// Generate random password.
$this->global_password = $this
->randomName(10);
// Log in an Admin.
$this
->drupalLogin($this->adminUser);
// Submit the configuration form.
$protected_node_settings = array(
'protected_node_use_global_password' => PROTECTED_NODE_PER_NODE_AND_GLOBAL_PASSWORD,
'protected_node_global_password_field[pass1]' => $this->global_password,
'protected_node_global_password_field[pass2]' => $this->global_password,
);
$this
->drupalPost('admin/config/content/protected_node', $protected_node_settings, t('Save configuration'));
}