You are here

public function RngEventTypeEntityTest::testGetIdentityTypeEntityFormMode in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/RngEventTypeEntityTest.php \Drupal\Tests\rng\Kernel\RngEventTypeEntityTest::testGetIdentityTypeEntityFormMode()

Tests getting a single identity type form mode.

@covers ::getIdentityTypeEntityFormMode

File

tests/src/Kernel/RngEventTypeEntityTest.php, line 20

Class

RngEventTypeEntityTest
Tests event type entities.

Namespace

Drupal\Tests\rng\Kernel

Code

public function testGetIdentityTypeEntityFormMode() {
  $people_type = [
    'entity_type' => $this
      ->randomMachineName(),
    'bundle' => $this
      ->randomMachineName(),
    'entity_form_mode' => $this
      ->randomMachineName(),
  ];
  $values['people_types'][] = $people_type;
  $event_type = $this
    ->createEventTypeBase($values);
  $result = $event_type
    ->getIdentityTypeEntityFormMode($people_type['entity_type'], $people_type['bundle']);
  $this
    ->assertEquals($people_type['entity_form_mode'], $result);
}