function TypedDataEntityRelationshipPluginTest::testRelationshipName

Same name in other branches
  1. 4.0.x tests/src/Kernel/TypedDataEntityRelationshipPluginTest.php \Drupal\Tests\ctools\Kernel\TypedDataEntityRelationshipPluginTest::testRelationshipName()

@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());
}