1 node.test NodePostSettingsTestCase::testPageNotPostInfo()

Confirms absence of post information on a new node.

File

core/modules/node/tests/node.test, line 1407
Tests for node.module.

Class

NodePostSettingsTestCase
Checks that the post information displays when enabled for a content type.

Code

function testPageNotPostInfo() {

  // Set "Page" content type to display post information.
  $edit = array();
  $edit['node_submitted'] = FALSE;
  $this->backdropPost('admin/structure/types/manage/page', $edit, t('Save content type'));

  // Create a node.
  $edit = array();
  $langcode = LANGUAGE_NONE;
  $edit["title"] = $this->randomName(8);
  $edit["body[$langcode][0][value]"] = $this->randomName(16);
  $this->backdropPost('node/add/page', $edit, t('Save'));

  // Check that the post information is displayed.
  $this->backdropGetNodeByTitle($edit["title"]);
  $this->assertNoRaw('<span class="submitted">', 'Post information is not displayed.');
}