function OverrideNodeOptionsTestCase::testNodeRevisions in Override Node Options 6
Same name and namespace in other branches
- 8 override_node_options.test \OverrideNodeOptionsTestCase::testNodeRevisions()
Test the 'Revision information' fieldset.
File
- ./
override_node_options.test, line 86 - Unit tests for the override_node_options module.
Class
- OverrideNodeOptionsTestCase
- @file Unit tests for the override_node_options module.
Code
function testNodeRevisions() {
$this->admin_user = $this
->drupalCreateUser(array(
'create page content',
'edit any page content',
'override page revision option',
));
$this
->drupalLogin($this->admin_user);
$fields = array(
'revision' => TRUE,
);
$this
->drupalPost('node/' . $this->node->nid . '/edit', $fields, t('Save'));
$this
->assertNodeFieldsUpdated($this->node, array(
'vid' => $this->node->vid + 1,
));
$this
->drupalLogin($this->normal_user);
$this
->assertNodeFieldsNoAccess($this->node, array_keys($fields));
}