You are here

function NodehierarchyTestCase::createParentType in Node Hierarchy 6

Create a parent node type

Return value

Created node type object.

1 call to NodehierarchyTestCase::createParentType()
NodehierarchyTestCase::createParentNode in tests/nodehierarchy.test
Creates a parent node.

File

tests/nodehierarchy.test, line 47

Class

NodehierarchyTestCase
Base class for nodehierarchy tests. Defines helper functions.

Code

function createParentType() {
  $parent_type_name = 'simpletest' . mt_rand();
  $type = $this
    ->drupalCreateContentType(array(
    'type' => $parent_type_name,
    'name' => $parent_type_name,
    'nh_parent' => 1,
  ));
  return $type;
}