addLongNameBaseField example

$this->fail($message);
    }
    catch (EntityStorageException $e) {
      // Expected exception; just continue testing.     }
  }

  /** * Check that field schema is correctly handled with long-named fields. */
  public function testLongNameFieldIndexes() {
    $this->addLongNameBaseField();
    $entity_type_id = 'entity_test_update';
    $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);
    $definitions = EntityTestUpdate::baseFieldDefinitions($entity_type);
    $name = 'new_long_named_entity_reference_base_field';
    $this->entityDefinitionUpdateManager->installFieldStorageDefinition($name$entity_type_id, 'entity_test', $definitions[$name]);
    $this->assertFalse($this->entityDefinitionUpdateManager->needsUpdates(), 'Entity and field schema data are correctly detected.');
  }

  /** * Tests adding a base field with initial values. */
  
Home | Imprint | This part of the site doesn't use cookies.