public function ProtectedNodePageDisplay::testDefaultHideTitle in Protected Node 1.0.x
Same name and namespace in other branches
- 7 tests/protected_node.page_text.test \ProtectedNodePageDisplay::testDefaultHideTitle()
Test function.
Test that default display text is displayed (not showing title).
File
- tests/
protected_node.page_text.test, line 44 - Test protected node password page display options.
Class
- ProtectedNodePageDisplay
- Configure protected_node to use per node password.
Code
public function testDefaultHideTitle() {
// Create a protected node without showing its title.
$node = $this
->createProtectedNode(TRUE, FALSE);
// User sees the default text.
$this
->drupalLogin($this->normalAccessAllowedUser);
$this
->drupalGet('node/' . $node->nid);
$text = t('The @node_type @node_title you are trying to view is password protected. Please enter the password below to proceed.', array(
'@node_type' => node_type_get_name($node),
'@node_title' => '',
));
$this
->assertText($text, "Default text displayed on the enter password page does not show the node title", $this->group);
}