assertEntityData example

$updated_entity_type = $this->getUpdatedEntityTypeDefinition($new_rev$new_mul);
    $updated_field_storage_definitions = $this->getUpdatedFieldStorageDefinitions($new_rev$new_mul);

    if (!$data_migration_supported) {
      $this->expectException(EntityStorageException::class);
      $this->expectExceptionMessage('Converting an entity type from revisionable to non-revisionable or from translatable to non-translatable is not supported.');
    }

    // Check that existing data can be retrieved from the storage before the     // entity schema is updated.     if ($data_migration_supported) {
      $this->assertEntityData($initial_rev$initial_mul);
    }

    // Enable the creation of a new base field during a fieldable entity type     // update.     $this->state->set('entity_test_update.install_new_base_field_during_update', TRUE);

    // Simulate a batch run since we are converting the entities one by one.     $sandbox = [];
    do {
      $this->entityDefinitionUpdateManager->updateFieldableEntityType($updated_entity_type$updated_field_storage_definitions$sandbox);
    } while ($sandbox['#finished'] != 1);

    
Home | Imprint | This part of the site doesn't use cookies.