diff --git a/tests/src/Kernel/RngEventTypeEntityTest.php b/tests/src/Kernel/RngEventTypeEntityTest.php index 52c0e73..f971a71 100644 --- a/tests/src/Kernel/RngEventTypeEntityTest.php +++ b/tests/src/Kernel/RngEventTypeEntityTest.php @@ -13,6 +13,41 @@ */ class RngEventTypeEntityTest extends RngKernelTestBase { + /** + * Tests getting a single identity type form mode. + * + * @covers ::getIdentityTypeEntityFormMode + */ + 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); + } + + /** + * Tests getting a single identity type form mode when no defaults set. + * + * @covers ::getIdentityTypeEntityFormMode + */ + public function testGetIdentityTypeEntityFormModeNoDefaults() { + $people_type = [ + 'entity_type' => $this->randomMachineName(), + 'bundle' => $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('default', $result); + } + /** * Test getting all identity type form modes. *