You are here

protected function RngTestTrait::createRegistrationType in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Tests/RngTestTrait.php \Drupal\rng\Tests\RngTestTrait::createRegistrationType()
  2. 3.x src/Tests/RngTestTrait.php \Drupal\rng\Tests\RngTestTrait::createRegistrationType()

Create and save a registration type entity.

Return value

\Drupal\rng\RegistrationTypeInterface A registration type entity

10 calls to RngTestTrait::createRegistrationType()
RngEventAccessTest::setUp in tests/src/Kernel/RngEventAccessTest.php
RngEventAccessTest::setUp in src/Tests/RngEventAccessTest.php
Sets up a Drupal site for running functional and integration tests.
RngEventAccessWebTest::setUp in tests/src/Functional/RngEventAccessWebTest.php
RngMessageRules::setUp in tests/src/Kernel/RngMessageRules.php
RngRegistrantRouteTest::setUp in src/Tests/RngRegistrantRouteTest.php
Sets up a Drupal site for running functional and integration tests.

... See full list

File

src/Tests/RngTestTrait.php, line 22

Class

RngTestTrait

Namespace

Drupal\rng\Tests

Code

protected function createRegistrationType() {
  $registration_type = RegistrationType::create([
    'id' => 'registration_type_a',
    'label' => 'Registration Type A',
    'description' => 'Description for registration type a',
  ]);
  $registration_type
    ->save();
  return $registration_type;
}