You are here

public function TypedDataEntityRelationshipPluginTest::testRelationshipName in Chaos Tool Suite (ctools) 8.3

@covers ::getName

File

tests/src/Kernel/TypedDataEntityRelationshipPluginTest.php, line 17

Class

TypedDataEntityRelationshipPluginTest
@coversDefaultClass \Drupal\ctools\Plugin\Relationship\TypedDataEntityRelationship @group CTools

Namespace

Drupal\Tests\ctools\Kernel

Code

public function testRelationshipName() {

  /** @var \Drupal\ctools\Plugin\RelationshipInterface $nid_plugin */
  $type_plugin = $this->relationshipManager
    ->createInstance('typed_data_entity_relationship:entity:node:type');
  $this
    ->assertSame('type', $type_plugin
    ->getName());

  /** @var \Drupal\ctools\Plugin\RelationshipInterface $uuid_plugin */
  $uid_plugin = $this->relationshipManager
    ->createInstance('typed_data_entity_relationship:entity:node:uid');
  $this
    ->assertSame('uid', $uid_plugin
    ->getName());
}