You are here

function RegistrationTestCase::createRegistration in Entity Registration 7

Same name and namespace in other branches
  1. 8.2 tests/registration.test \RegistrationTestCase::createRegistration()
  2. 7.2 tests/registration.test \RegistrationTestCase::createRegistration()

Create a Registration programmatically.

Parameters

array $values: Additional properties to add to registration entity.

6 calls to RegistrationTestCase::createRegistration()
RegistrationAPITestCase::testHookAccess in tests/registration.test
Test hook_registration_access().
RegistrationStandardTestCase::testHostEntityBroadcastForm in tests/registration.test
Tests email broadcast functionality.
RegistrationStandardTestCase::testHostRegistrationStatus in tests/registration.test
Check internal status modifiers.
RegistrationStandardTestCase::testRegistrationHostDelete in tests/registration.test
RegistrationStandardTestCase::testUserCancel in tests/registration.test
Ensure registrations are processed when a user is cancelled.

... See full list

File

tests/registration.test, line 73
Tests for the Registration module

Class

RegistrationTestCase
@file Tests for the Registration module

Code

function createRegistration(array $values = array()) {
  $registration = entity_create('registration', array(
    'entity_type' => $this->host_entity_type,
    'entity_id' => $this->host_entity_id,
    'type' => $this->registration_type_name,
  ) + $values);
  entity_save('registration', $registration);
  return $registration;
}