function field_test_entity_save

Saves a test_entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to save.

5 calls to field_test_entity_save()
DisplayApiTest::setUp in drupal/core/modules/field/lib/Drupal/field/Tests/DisplayApiTest.php
Set the default field storage backend for fields created during tests.
DisplayApiTest::testFieldEmpty in drupal/core/modules/field/lib/Drupal/field/Tests/DisplayApiTest.php
Tests that the prepareView() formatter method still fires for empty values.
field_test_entity_nested_form_submit in drupal/core/modules/field/tests/modules/field_test/field_test.entity.inc
Submit handler for field_test_entity_nested_form().
FormTest::testNestedFieldForm in drupal/core/modules/field/lib/Drupal/field/Tests/FormTest.php
Tests Field API form integration within a subform.
TranslationWebTest::testFieldFormTranslationRevisions in drupal/core/modules/field/lib/Drupal/field/Tests/TranslationWebTest.php
Tests field translations when creating a new revision.

File

drupal/core/modules/field/tests/modules/field_test/field_test.entity.inc, line 197
Defines an entity type.

Code

function field_test_entity_save(EntityInterface $entity) {
  $entity
    ->save();
}