public function NodePageDisableFunctionalTest::testRetained in Node Page Disable 7
Test respect of variable node_page_disable_path_node_keep
File
- ./
node_page_disable.test, line 23 - Tests for node_page_disable.module.
Class
- NodePageDisableFunctionalTest
- Functional Tests for the node_page_disable.
Code
public function testRetained() {
$_control_group = 'Module Settings';
module_enable(array(
'node_page_disable',
));
variable_set('node_page_disable_path_node_keep', FALSE);
menu_rebuild();
$html = $this
->drupalGet('node');
$this
->assertRaw('No front page content has been created yet.', 'Assert /node is available when node_page_disable_path_node_keep is TRUE', $_control_group);
variable_set('node_page_disable_path_node_keep', FALSE);
menu_rebuild();
$html = $this
->drupalGet('node');
$this
->assertRaw('No front page content has been created yet.', 'Assert /node is available when node_page_disable_path_node_keep is FALSE but site_frontpage is still set to node', $_control_group);
variable_set('site_frontpage', 'welcome');
variable_set('node_page_disable_path_node_keep', FALSE);
menu_rebuild();
$html = $this
->drupalGet('node');
$this
->assertRaw('Page not found', 'Assert /node is disabled when node_page_disable_path_node_keep is FALSE', $_control_group);
}