You are here

protected function RelationTestBase::createRelationNodes in Relation 8

Same name and namespace in other branches
  1. 8.2 src/Tests/RelationTestBase.php \Drupal\relation\Tests\RelationTestBase::createRelationNodes()

Creates nodes.

1 call to RelationTestBase::createRelationNodes()
RelationTestBase::setUp in src/Tests/RelationTestBase.php
Sets up a Drupal site for running functional and integration tests.

File

src/Tests/RelationTestBase.php, line 60

Class

RelationTestBase
Provides common helper methods for Taxonomy module tests.

Namespace

Drupal\relation\Tests

Code

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