You are here

private function EntityformCRUDTestCase::updateEntityformType in Entityform 7

Same name and namespace in other branches
  1. 7.2 entityform.test \EntityformCRUDTestCase::updateEntityformType()
1 call to EntityformCRUDTestCase::updateEntityformType()
EntityformCRUDTestCase::testCreateEntityformType in ./entityform.test

File

./entityform.test, line 146

Class

EntityformCRUDTestCase
Test basic CRUD functionality.

Code

private function updateEntityformType($machine_name, $properties, $data) {

  // Force a clear of the entitytype cache.
  entityform_type_cache_reset();
  $entityform_type = entityform_type_load($machine_name);
  if (!empty($properties)) {
    foreach ($properties as $property => $value) {
      $entityform_type->{$property} = $value;
    }
  }
  if (!empty($data)) {
    foreach ($data as $property => $value) {
      $entityform_type->data[$property] = $value;
    }
  }
  entityform_type_save($entityform_type);
}