You are here

protected function RelationTestBase::createRelationEndPoints in Relation 8.2

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

Creates end points.

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

File

src/Tests/RelationTestBase.php, line 100

Class

RelationTestBase
Provides common helper methods for Taxonomy module tests.

Namespace

Drupal\relation\Tests

Code

protected function createRelationEndPoints() {
  $this->endpoints = [
    [
      'target_type' => 'node',
      'target_id' => $this->node1
        ->id(),
    ],
    [
      'target_type' => 'node',
      'target_id' => $this->node4
        ->id(),
    ],
  ];
  $this->endpoints_4 = [
    [
      'target_type' => 'node',
      'target_id' => $this->node1
        ->id(),
    ],
    [
      'target_type' => 'node',
      'target_id' => $this->node2
        ->id(),
    ],
    [
      'target_type' => 'node',
      'target_id' => $this->node3
        ->id(),
    ],
    [
      'target_type' => 'node',
      'target_id' => $this->node4
        ->id(),
    ],
  ];
  $this->endpoints_entitysame = [
    [
      'target_type' => 'node',
      'target_id' => $this->node3
        ->id(),
    ],
    [
      'target_type' => 'node',
      'target_id' => $this->node4
        ->id(),
    ],
  ];
  $this->endpoints_entitydifferent = [
    [
      'target_type' => 'user',
      'target_id' => $this->user1
        ->id(),
    ],
    [
      'target_type' => 'node',
      'target_id' => $this->node3
        ->id(),
    ],
  ];
  $this->endpoints_unary = [
    [
      'target_type' => 'node',
      'target_id' => $this->node5
        ->id(),
    ],
  ];
}