public function RngEventTypeEntityTest::testGetIdentityTypeEntityFormModes in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/RngEventTypeEntityTest.php \Drupal\Tests\rng\Kernel\RngEventTypeEntityTest::testGetIdentityTypeEntityFormModes()
- 8 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\KernelCode
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']]);
}