You are here

function RelationTestCase::createRelationNodes in Relation 7

Creates nodes.

1 call to RelationTestCase::createRelationNodes()
RelationTestCase::setUp in tests/relation.test
Sets up a Drupal site for running functional and integration tests.

File

tests/relation.test, line 59
Tests for Relation module.

Class

RelationTestCase
Relation helper class.

Code

function createRelationNodes() {
  $this->node1 = $this
    ->drupalCreateNode(array(
    'type' => 'article',
    'promote' => 1,
    'title' => 'Grandparent',
  ));
  $this->node2 = $this
    ->drupalCreateNode(array(
    'type' => 'article',
    'promote' => 0,
  ));
  $this->node3 = $this
    ->drupalCreateNode(array(
    'type' => 'page',
    'promote' => 1,
    'title' => 'Parent',
  ));
  $this->node4 = $this
    ->drupalCreateNode(array(
    'type' => 'page',
    'promote' => 0,
    'title' => 'Child',
  ));
  $this->node5 = $this
    ->drupalCreateNode(array(
    'type' => 'page',
    'promote' => 0,
  ));
  $this->node6 = $this
    ->drupalCreateNode(array(
    'type' => 'page',
    'promote' => 0,
    'title' => 'Unrelated',
  ));
}