You are here

function NodehierarchyTestCase::createParentNode in Node Hierarchy 6

Creates a parent node.

Parameters

$settings: An associative array of settings to be passed to drupalCreateNode. If none given then it creates a new node type and uses that instead

Return value

Created node object.

1 call to NodehierarchyTestCase::createParentNode()
NodeHierarchyCreateParentChildTests::testCreateChildNode in tests/nodehierarchy.test

File

tests/nodehierarchy.test, line 74

Class

NodehierarchyTestCase
Base class for nodehierarchy tests. Defines helper functions.

Code

function createParentNode($edit = array()) {
  if (isset($edit['type'])) {
    $ctype = $this
      ->createParentType();
    $edit['type'] = $ctype->type;
  }
  $node = $this
    ->drupalCreateNode($edit);
  return $node;
}