public function DisableBreadcrumbsTestCase::testDisableNodeBreadcrumbs in Disable breadcrumbs 7
File
- ./
disable_breadcrumbs.test, line 29 - Automated tests for disable breadcrumbs module.
Class
- DisableBreadcrumbsTestCase
- @file Automated tests for disable breadcrumbs module.
Code
public function testDisableNodeBreadcrumbs() {
// Login in the admin user.
$this
->drupalLogin($this->admin_user);
// Get admin settings form.
$this
->drupalGet('admin/appearance/disable_breadcrumbs');
$edit = array(
//'disable_breadcrumbs_node_types' => drupal_map_assoc(array('page', 'article')),
//'disable_breadcrumbs_node_types_all[article]' => 'article',
'disable_breadcrumbs_all' => 1,
);
$this
->drupalPost('admin/appearance/disable_breadcrumbs', $edit, t("Save configuration"));
$this
->assertText(t('The configuration options have been saved.'), t('Configuration options saved.'));
// Login the editor user.
$this
->drupalLogin($editor);
$settings = array(
'type' => 'page',
'title' => $this
->randomName(24),
'body' => array(
LANGUAGE_NONE => array(
array(
$this
->randomName(28),
),
),
),
);
$node = $this
->drupalCreateNode($settings);
$this
->verbose('Node created: ' . var_export($node, TRUE));
$edit = array();
$edit['disable_breadcrumb'] = 1;
//$this->randomName(16);
$this
->drupalPost("node/{$node->nid}", $edit, t('Save'));
//$this->assertText(t('Breadcrumb changed on node @nid', array('@nid' => $node->nid)));
}