You are here

public function RegistrationTestCase::createRegistration in Entity Registration 8

File

src/Tests/RegistrationTestCase.php, line 84
Tests for the Registration module

Class

RegistrationTestCase
@file Tests for the Registration module

Namespace

Drupal\registration\Tests

Code

public function createRegistration(array $values = []) {
  $registration = \Drupal::entityManager()
    ->getStorage('registration')
    ->create([
    'entity_type' => $this->host_entity_type,
    'entity_id' => $this->host_entity_id,
    'type' => $this->registration_type_name,
  ] + $values);
  $registration
    ->save();
  return $registration;
}