You are here

protected function RngTestTrait::createRegistrationType in RNG - Events and Registrations 3.x

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

Create and save a registration type entity.

Return value

\Drupal\rng\Entity\RegistrationTypeInterface A registration type entity

10 calls to RngTestTrait::createRegistrationType()
RngEventAccessTest::setUp in src/Tests/RngEventAccessTest.php
RngEventAccessTest::setUp in tests/src/Kernel/RngEventAccessTest.php
RngEventAccessWebTest::setUp in tests/src/Functional/RngEventAccessWebTest.php
RngMessageRules::setUp in tests/src/Kernel/RngMessageRules.php
RngRegistrantRouteTest::setUp in src/Tests/RngRegistrantRouteTest.php

... See full list

File

src/Tests/RngTestTrait.php, line 25

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;
}