You are here

protected function RngEventTypeEntityTest::createEventTypeBase 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::createEventTypeBase()
  2. 3.x tests/src/Kernel/RngEventTypeEntityTest.php \Drupal\Tests\rng\Kernel\RngEventTypeEntityTest::createEventTypeBase()

Create a event type with only required info.

Parameters

array $values: Default values to use when creating the event type.

Return value

\Drupal\rng\Entity\EventTypeInterface An new event type entity.

6 calls to RngEventTypeEntityTest::createEventTypeBase()
RngEventTypeEntityTest::testGetDefaultRegistrantType in tests/src/Kernel/RngEventTypeEntityTest.php
Test default registrant type defaults.
RngEventTypeEntityTest::testGetDefaultRegistrantTypeDefault in tests/src/Kernel/RngEventTypeEntityTest.php
Test getting default registrant type defaults set.
RngEventTypeEntityTest::testGetIdentityTypeEntityFormMode in tests/src/Kernel/RngEventTypeEntityTest.php
Tests getting a single identity type form mode.
RngEventTypeEntityTest::testGetIdentityTypeEntityFormModeNoDefaults in tests/src/Kernel/RngEventTypeEntityTest.php
Tests getting a single identity type form mode when no defaults set.
RngEventTypeEntityTest::testGetIdentityTypeEntityFormModes in tests/src/Kernel/RngEventTypeEntityTest.php
Test getting all identity type form modes.

... See full list

File

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

Class

RngEventTypeEntityTest
Tests event type entities.

Namespace

Drupal\Tests\rng\Kernel

Code

protected function createEventTypeBase($values = []) {
  $event_type = RngEventType::create($values + [
    'id' => $this
      ->randomMachineName(),
    'label' => $this
      ->randomMachineName(),
    'entity_type' => 'entity_test',
    'bundle' => 'entity_test',
  ]);
  return $event_type;
}