You are here

function title_test_entity_save in Title 7

Save the given test entity.

1 call to title_test_entity_save()
TitleFieldReplacementTestCase::testFieldReplacementWorkflow in tests/TitleFieldReplacementTestCase.test
Test field replacement API and workflow.

File

tests/title_test.module, line 52
Testing functionality for Title module.

Code

function title_test_entity_save($entity) {

  // field_test_entity_save does not invoke hook_entity_presave().
  module_invoke_all('entity_presave', $entity, 'test_entity');
  field_test_entity_save($entity);

  // field_test_entity_save does not invoke hook_entity_insert().
  $hook = $entity->is_new ? 'entity_insert' : 'entity_update';
  module_invoke_all($hook, $entity, 'test_entity');
}