You are here

public function RngEventTypeEntityTest::testGetIdentityTypeEntityFormModes in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/RngEventTypeEntityTest.php \Drupal\Tests\rng\Kernel\RngEventTypeEntityTest::testGetIdentityTypeEntityFormModes()
  2. 3.x tests/src/Kernel/RngEventTypeEntityTest.php \Drupal\Tests\rng\Kernel\RngEventTypeEntityTest::testGetIdentityTypeEntityFormModes()

Test getting all identity type form modes.

@covers ::getIdentityTypeEntityFormModes

File

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

Class

RngEventTypeEntityTest
Tests event type entities.

Namespace

Drupal\Tests\rng\Kernel

Code

public function testGetIdentityTypeEntityFormModes() {
  $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
    ->getIdentityTypeEntityFormModes();
  $this
    ->assertEquals($people_type['entity_form_mode'], $result[$people_type['entity_type']][$people_type['bundle']]);
}