function RegistrationStandardTestCase::testHostEntitySettings in Entity Registration 8.2
Same name in this branch
- 8.2 tests/registration.test \RegistrationStandardTestCase::testHostEntitySettings()
- 8.2 src/RegistrationStandardTestCase.php \Drupal\registration\RegistrationStandardTestCase::testHostEntitySettings()
Tests entity update helper.
File
- src/
RegistrationStandardTestCase.php, line 74
Class
- RegistrationStandardTestCase
- Creates a registration type Create node entity type ensure registration type exists
Namespace
Drupal\registrationCode
function testHostEntitySettings() {
$settings = array(
'status' => 1,
'settings' => array(
'random_string' => $this
->randomName(),
),
);
$this
->setHostEntitySettings($settings);
$db_settings = registration_entity_settings($this->host_entity_type, $this->host_entity_id);
$this
->assertTrue($settings['settings']['random_string'] === $db_settings['settings']['random_string'], t('Saving host entity registration settings'), 'Registration');
// Tests static caching.
$settings = array(
'status' => 0,
'settings' => array(
'random_string' => $this
->randomName(),
),
);
$this
->setHostEntitySettings($settings);
$db_settings = registration_entity_settings($this->host_entity_type, $this->host_entity_id, TRUE);
$this
->assertTrue($settings['settings']['random_string'] === $db_settings['settings']['random_string'], t('Saving host entity registration settings.'), 'Registration');
}