public function ProtectedNodePageDisplay::testContentTypeDescriptionOnly in Protected Node 7
Same name and namespace in other branches
- 1.0.x tests/protected_node.page_text.test \ProtectedNodePageDisplay::testContentTypeDescriptionOnly()
Test function.
Test that the password page description content type setting is displayed.
File
- tests/
protected_node.page_text.test, line 107 - Test protected node password page display options.
Class
- ProtectedNodePageDisplay
- Configure protected_node to use per node password.
Code
public function testContentTypeDescriptionOnly() {
$content_type_description = $this
->randomName(16);
// Set global text.
$this
->drupalLogin($this->adminUser);
$settings = array(
'protected_node_description' => $content_type_description,
);
$this
->drupalPost('admin/structure/types/manage/page', $settings, t('Save content type'));
// $show_title_option_available is FALSE since there is a custom description
// set.
$node = $this
->createProtectedNode(FALSE);
// User sees the set global text.
$this
->drupalLogin($this->normalAccessAllowedUser);
$this
->drupalGet('node/' . $node->nid);
$this
->assertText($content_type_description, "Custom per content type text displayed on the enter password page", $this->group);
}